Files
pa11y-dashboard/.github/workflows/tests.yml
Danyal Aytekin e55cae4786 In workflow, update default branch to main, use ubuntu-20.04 (#315)
* Update default branch name to `main`

* Use `ubuntu-20.04` for build, until this project upgrades to `pa11y-webservice@5`
2023-11-12 15:52:09 +00:00

45 lines
1.1 KiB
YAML

name: Build and lint
on:
push:
branches:
- main
pull_request:
jobs:
checkout_and_test:
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- node-version: 12.x
lint: true # Linter is run only once to shorten the total build time
- node-version: 14.x
steps:
- name: Checkout code from ${{ github.repository }}
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: MongoDB in GitHub Actions
uses: supercharge/mongodb-github-action@1.3.0
with:
mongodb-version: 3.4
- name: Install dependencies
run: npm i
- name: Run linter
if: ${{ matrix.lint }}
run: make lint
- name: Create test config
run: cp config/test.sample.json config/test.json
- name: Start test app
run: NODE_ENV=test node index.js &
- name: Wait / Sleep
uses: jakejarvis/wait-action@v0.1.0
with:
time: '10s'
- name: Run tests
run: make ci