Skip to content

Commit

Permalink
Split up test jobs so that they can be run concurrently
Browse files Browse the repository at this point in the history
  • Loading branch information
frankieroberto committed Oct 23, 2024
1 parent b74edb8 commit 8a1f110
Showing 1 changed file with 41 additions and 10 deletions.
51 changes: 41 additions & 10 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,66 @@ name: Pull request
on: pull_request

jobs:
build:
name: Pull request
sonar_analysis:
name: Sonar analysis
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Sonar analysis
uses: sonarsource/sonarcloud-github-action@master
with:
projectBaseDir: .
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

linting:
name: Code style checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run linting
run: npm run lint


tests:
name: Javascript unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test

ui_tests:
name: Visual regression tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test

- name: Run backstop
run: npm run backstop:ci

0 comments on commit 8a1f110

Please sign in to comment.