Skip to content

Commit

Permalink
ci: run all in one check
Browse files Browse the repository at this point in the history
  • Loading branch information
ashgw committed Feb 15, 2024
1 parent a216f2f commit 5ebd609
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 85 deletions.
81 changes: 75 additions & 6 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ on:
push:
branches:
- main
- prod-preview
pull_request:
branches:
- main
- prod-preview
types:
- opened
- synchronize

permissions:
contents: write
Expand All @@ -13,15 +21,76 @@ concurrency:
cancel-in-progress: false

jobs:
test-check:
uses: ./.github/workflows/tests.yml
lint-check:
uses: ./.github/workflows/lint.yml
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Node
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'
- name: Set up .env
run: echo '${{ secrets.ENV_VARS }}' >> .env.local
- name: Install dependencies w/ setup
run: pnpm i
- name: lint
run: pnpm lint
test:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [18, 19, 20]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Set up .env
run: echo '${{ secrets.ENV_VARS }}' >> .env.local
- name: Install dependencies w/ setup
run: pnpm i
- name: Running code tests
run: npx jest

playwright:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Set up .env
run: |
echo '${{ secrets.ENV_VARS }}' >> .env.local
- name: Install dependencies
run: npm install -g pnpm && pnpm install --frozen-lockfile
- name: Install Playwright Browsers
run: npx playwright install # issue not resolved with pnpm
- name: Run Playwright tests
run: cd test/e2e && npx playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30

check:
if: always()
needs:
- test-check
- lint-check
- lint
- test
- playwright
runs-on: ubuntu-latest
steps:
- uses: re-actors/alls-green@release/v1
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/lint.yaml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/tests.yaml

This file was deleted.

0 comments on commit 5ebd609

Please sign in to comment.