.github/workflows/auto-build.yml
name: CI / Automated testing
on:
pull_request:
branches:
- '**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
install-deps:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install deps
uses: ./.github/workflows/composite/npm
build-and-test:
runs-on: ubuntu-latest
needs: install-deps
strategy:
fail-fast: false
matrix:
target: ['lint', 'format', 'build', 'test', 'e2e']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install deps
uses: ./.github/workflows/composite/npm
- name: Execute ${{ matrix.target }} npm script
if: ${{ matrix.target != 'e2e' }}
run: npm run ${{ matrix.target }}
- name: Execute e2e npm script
if: ${{ matrix.target == 'e2e' }}
uses: cypress-io/github-action@v6
timeout-minutes: 10
with:
wait-on: 'http://localhost:8080/'
wait-on-timeout: 120
start: npm start
browser: chrome
record: ${{ github.repository == 'NeuraLegion/cypress-har-generator' }}
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}