-
Notifications
You must be signed in to change notification settings - Fork 75
85 lines (75 loc) · 2.63 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: CI
on:
push:
branches:
- main
pull_request:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
audit-deps:
name: Audit Dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.16.0
pnpm-version: 9.0.6
- run: pnpm audit --prod --audit-level high
check-packages-changed:
needs: audit-deps
name: Check if packages have change
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.packages-changed.outputs.any_changed }}
steps:
- uses: actions/checkout@v3
- name: Check external packages changes
id: packages-changed
uses: tj-actions/changed-files@v22.2
with:
files: |
**/packages/**
changesets:
name: Changeset Checks
needs: [audit-deps, check-packages-changed]
if: ${{ github.head_ref != 'changeset-release/main' && needs.check-packages-changed.outputs.changed == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# need this to get full git-history/clone in order to build changelogs and check changesets
fetch-depth: 0
- uses: FuelLabs/github-actions/setups/node@ps/chore/enable-docs-with-snippets-inline # temporary fix to point to this branch instead of master, to avoid the changeset ci breaking due to the latest commit(https://github.com/FuelLabs/github-actions/commit/0c63b2f8b88ce896748ac4ec42a3b8e40daf8647)
with:
node-version: 20.16.0
pnpm-version: 9.0.6
- run: pnpm changeset:check
validate:
runs-on: buildjet-4vcpu-ubuntu-2204
needs: audit-deps
steps:
- uses: actions/checkout@v3
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.16.0
pnpm-version: 9.0.6
- uses: FuelLabs/github-actions/setups/docker@master
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/setup-rust
- name: Build projects
run: pnpm build
- name: Check projects formatting
run: pnpm check
- name: Test projects
run: pnpm test
# TODO issue 115: https://github.com/FuelLabs/fuel-bridge/issues/115
# Run test again to ensure it works with node that already has transactions/messages
# - name: Test projects Again
# run: pnpm --filter @fuel-bridge/integration-tests test