-
Notifications
You must be signed in to change notification settings - Fork 2.1k
57 lines (54 loc) · 1.29 KB
/
pr.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
53
54
55
56
57
name: Pull request workflow
on:
pull_request:
types: [opened, reopened, synchronize, edited]
permissions:
pull-requests: read
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
env:
CI_JOB_NUMBER: 1
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
cache: npm
node-version: 18
- run: npm i
- run: npm run build
- run: npm run test
- uses: preactjs/compressed-size-action@v2
with:
pattern: ".dist/**/*.{js,ts,json}"
static-tests:
name: Static tests
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
cache: npm
node-version: 18
- run: npm i
- run: npm run prettier:check
build-docker:
name: Build Docker image
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: false
semantic-pr:
name: Validate PR title for semantic versioning
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}