Update Node.js to v18 #6406
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Frontend and backend | |
# This workflow is triggered on pushes to the repository. | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
lint-javascript: | |
name: lint javascript | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- name: Install node modules | |
run: yarn install | |
- name: Run lint | |
run: yarn lint:js | |
lint-templates: | |
name: lint ember templates | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- name: Install node modules | |
run: yarn install | |
- name: Run lint | |
run: yarn lint:hbs | |
test-bundlesize: | |
name: test bundlesize | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install php | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '7.4' | |
extensions: mbstring, zip | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- name: Install node modules | |
run: yarn install | |
- name: Run tests | |
run: yarn test:bundlesize | |
test-csp-header: | |
name: test CSP in .htaccess | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- name: Install node modules | |
run: yarn install | |
- name: Run tests | |
run: yarn test:csp-header | |
test-chrome: | |
name: test against Chrome | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- name: Install node modules | |
run: yarn install | |
- name: Install chrome browser | |
run: | | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
sudo apt install ./google-chrome-stable_current_amd64.deb | |
- name: Build with test environment | |
env: | |
CI: true | |
run: yarn build --environment test | |
- name: run tests in chrome | |
run: yarn test:ember --launch Chrome --path dist | |
test-firefox: | |
name: test against Firefox | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- name: Install node modules | |
run: yarn install | |
- name: Setup firefox | |
uses: browser-actions/setup-firefox@latest | |
with: | |
firefox-version: 102.0.1 | |
- name: Build with test environment | |
env: | |
CI: true | |
run: yarn build --environment test | |
- name: run tests in firefox | |
run: yarn test:ember --launch Firefox --path dist | |
test-browserstack: | |
name: test against additional browser in BrowserStack | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- name: Install node modules | |
run: yarn install | |
- name: Build with test environment | |
env: | |
CI: true | |
run: yarn build --environment test | |
- name: 'BrowserStack Env Setup' | |
uses: 'browserstack/github-actions/setup-env@master' | |
with: | |
username: 'jeldrikhanschke1' | |
access-key: 'xaM9Uxurv2GyxFLKQXgj' | |
- name: 'Start BrowserStackLocal Tunnel' | |
uses: 'browserstack/github-actions/setup-local@master' | |
with: | |
local-testing: 'start' | |
local-logging-level: 'all-logs' | |
local-identifier: 'random' | |
- name: 'Running test on BrowserStack' | |
run: yarn test:ember --config-file testem.browserstack.js --path dist | |
- name: 'BrowserStackLocal Stop' | |
uses: browserstack/github-actions/setup-local@master | |
with: | |
local-testing: stop | |
test-backend: | |
name: Test php backend | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] | |
steps: | |
- name: Checkout repository files | |
uses: actions/checkout@v3 | |
- name: Install php | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: mbstring, zip | |
- name: Install php dependencies | |
run: composer install | |
working-directory: ./api | |
- name: Run backend tests | |
run: ./vendor/bin/codecept run | |
working-directory: ./api |