forked from lpelypenko/axe-html-reporter
-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (52 loc) · 1.34 KB
/
build.yml
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
name: Build
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: mskelton/setup-yarn@v1
- run: yarn lint
- run: yarn prettier --check .
ts:
runs-on: ubuntu-latest
steps:
- uses: mskelton/setup-yarn@v1
- run: yarn ts
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
steps:
- uses: mskelton/setup-yarn@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install Playwright
run: yarn playwright install chromium --with-deps
- run: yarn test
- name: Upload test results
if: always()
uses: actions/upload-artifact@v2
with:
name: test-results
path: test-results
release:
needs: [lint, ts, test]
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: 18.x
cache: yarn
- run: yarn install --immutable
- name: Create release pull request or publish to npm
uses: changesets/action@v1
with:
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}