Update dependencies #126
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
# Runs CI tests: Nightwatch and linting | |
name: Continuous Integration tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: 'Install Node.js' | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '20.x' | |
- name: 'Install dependencies from npm' | |
run: | | |
npm install | |
- name: 'Build example project' | |
run: | | |
npm run build-test-app | |
- name: 'Start test containers' | |
run: | | |
# We can't use a GitHub Action service because they start before the source is cloned, and that causes issues | |
# Nginx | |
docker run \ | |
-d \ | |
--name nginx \ | |
-v ${{ github.workspace }}/test/app/dist:/usr/share/nginx/html:ro \ | |
nginx:1.19 | |
# Selenium with Chrome | |
docker run \ | |
-d \ | |
--name selenium-chrome \ | |
-p 4444:4444 \ | |
--link nginx \ | |
--shm-size=2g \ | |
selenium/standalone-chrome:119.0 | |
# Wait 5 seconds | |
sleep 5 | |
- name: 'Run tests' | |
run: | | |
npm run test | |
env: | |
SELENIUM_HOST: '127.0.0.1' | |
SELENIUM_PORT: '4444' | |
LAUNCH_URL: 'http://nginx' | |
- name: 'Run linter' | |
run: | | |
npm run lint |