-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.57 KB
/
ci.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
58
59
name: Continuous Integration
on:
push:
branches:
- main
pull_request:
env:
ARTIFACTS_DIR: ./artifacts
jobs:
commit-watch:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && !contains(github.event.head_commit.message, '[skip ci]')
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Prepare Environment
uses: ./.github/actions/prepare-env
- name: Commit Watch
env:
COMMIT_WATCH_OUTPUT_DIR: ${{ env.ARTIFACTS_DIR }}
COMMITWATCH_GITHUB_TOKEN: ${{ secrets.PR_BOT_GITHUB_TOKEN }}
CI_REPO_OWNER: ${{ github.repository_owner }}
CI_REPO_NAME: ${{ github.event.repository.name }}
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
CI_BASE_BRANCH: origin/${{ github.base_ref }}
run: yarn dlx commit-watch
build-and-test:
name: Build & Test
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
steps:
- uses: actions/checkout@v4
- name: Prepare Environment
uses: ./.github/actions/prepare-env
- uses: actions/cache@v4
with:
path: .turbo
key: ${{ github.job }}-${{ github.ref_name }}-${{ github.sha }}
restore-keys: ${{ github.job }}-${{ github.ref_name }}-
- name: Build packages
run: yarn prepack
- name: Tests
run: yarn test
- name: Lint
run: yarn lint
- name: Typecheck
run: yarn typecheck