Skip to content

Add conditional exports to package.json (#313) #132

Add conditional exports to package.json (#313)

Add conditional exports to package.json (#313) #132

Workflow file for this run

# 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