-
Notifications
You must be signed in to change notification settings - Fork 8
49 lines (39 loc) · 1.21 KB
/
pull_request.yaml
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
name: Checks pull request
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Configure Node and package manager
uses: actions/setup-node@v4
env:
SKIP_YARN_COREPACK_CHECK: true
with:
node-version-file: 'package.json'
cache: 'yarn'
- name: Enable corepack
run: corepack enable
- name: Install dependencies
run: yarn install --immutable
- name: Run linter
run: yarn lint
- name: Run tests
run: yarn test --maxWorkers=2
- name: Build code
run: yarn build
- name: Test size
env:
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
run: yarn run test-size
- name: Package extension
run: yarn package
- name: Rename artifact as PR
run: cd dist/web-ext-artifacts/ && mv * $(ls | sed 's/-/-PR-/')
- name: Publish on GitHub
uses: actions/upload-artifact@v4
with:
name: sporran-extension-${{ github.sha }}
path: dist/web-ext-artifacts/*