👷 cypress end-to-end testing #622
Workflow file for this run
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: Checks | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
workflow_dispatch: | |
concurrency: | |
cancel-in-progress: true | |
group: ${{ github.workflow }}-${{ github.branch }} | |
jobs: | |
build: | |
name: Build client | |
runs-on: ubuntu-latest | |
steps: | |
- uses: haliphax/narf/.github@main | |
- name: Build client | |
run: npm run build | |
commitlint: | |
name: CommitLint | |
if: ${{ contains(github.event_name, 'pull_request') }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: haliphax/narf/.github@main | |
- name: Lint pull request title | |
env: | |
PR_TITLE: ${{ github.event.pull_request.title }} | |
run: echo "$PR_TITLE" | npx commitlint | |
docker: | |
name: Docker build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: haliphax/narf/.github@main | |
- name: Docker build | |
run: docker build -t narf . | |
end-to-end: | |
name: End-to-end tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: haliphax/narf/.github@main | |
- name: End-to-end tests | |
run: | | |
npm run start & | |
npm run e2e | |
eslint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: haliphax/narf/.github@main | |
- name: ESLint | |
run: npx eslint . | |
prettier: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: haliphax/narf/.github@main | |
- name: Prettier | |
run: npx prettier -l -u . | |
unit-tests: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: haliphax/narf/.github@main | |
- uses: testspace-com/setup-testspace@v1 | |
with: | |
domain: ${{ github.repository_owner }} | |
- name: Run unit tests | |
run: npm run coverage | |
- name: Upload coverage report or add comment | |
uses: coverallsapp/github-action@v2 | |
if: always() | |
with: | |
file: coverage/clover.xml | |
- name: Push result to Testspace server | |
run: testspace ./coverage/clover.xml ./coverage/junit.xml | |
if: always() |