-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (59 loc) · 2.16 KB
/
Copy pathtest.yml
File metadata and controls
62 lines (59 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Test
on:
workflow_call:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/actions/bootstrap
- name: Check formatting
run: bun run format:check
- name: Restore ESLint cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: .eslintcache
key: eslint-${{ runner.os }}-${{ github.sha }}
restore-keys: eslint-${{ runner.os }}-
- name: Run ESLint
run: bun run lint
- name: Typecheck
run: bun run typecheck
- name: Shellcheck and test analyze.sh
run: |
shellcheck scripts/analyze.sh scripts/analyze.test.sh
sh scripts/analyze.test.sh
- name: Verify generated GraphQL types are up to date
run: |
bun run build:graphql
git diff --exit-code src/github/graphql/generated.ts
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/actions/bootstrap
- name: Get Playwright version
id: playwright-version
run: echo "version=$(jq -r '.devDependencies.playwright' package.json)" >> "$GITHUB_OUTPUT"
- name: Get Ubuntu version
id: ubuntu-version
run: echo "version=$(lsb_release -rs)" >> "$GITHUB_OUTPUT"
- name: Cache Playwright browsers
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: /home/runner/.cache/ms-playwright
key: ${{ runner.os }}-${{ steps.ubuntu-version.outputs.version }}-playwright-browsers-${{ steps.playwright-version.outputs.version }}
restore-keys: |
${{ runner.os }}-${{ steps.ubuntu-version.outputs.version }}-playwright-browsers-
- name: Install Playwright browsers
run: bunx playwright install --with-deps chromium
- name: Run tests
run: bun run test