-
Notifications
You must be signed in to change notification settings - Fork 15
131 lines (109 loc) · 3.75 KB
/
_01_pre_check.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
on:
workflow_call:
env:
FORCE_COLOR: 1
jobs:
cargo-fmt:
runs-on: namespace-profile-rust-builder
container:
image: "ghcr.io/${{ github.repository }}/rust-base:nightly-2024-11-23"
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout 🛒
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Check Format
run: cargo fmt --all -- --check
audit:
runs-on: namespace-profile-default
container:
image: "ghcr.io/${{ github.repository }}/rust-base:nightly-2024-11-23"
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout 🛒
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: cargo audit 🕵️♂️
run: cargo cf-audit
cargo-clippy:
runs-on: namespace-profile-rust-builder
container:
image: "ghcr.io/${{ github.repository }}/rust-base:nightly-2024-11-23"
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout 🛒
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Check Linting 📝
run: cargo cf-clippy-ci
lint-bouncer:
runs-on: namespace-profile-default
steps:
- name: Checkout chainflip-backend
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Install pnpm 💿
run: npm install -g pnpm
- name: Configure NodeJS 🛠️
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65
with:
node-version-file: ./bouncer/.nvmrc
cache: "pnpm"
registry-url: "https://npm.pkg.github.com"
cache-dependency-path: "bouncer/pnpm-lock.yaml"
- name: Install node dependencies 📦
working-directory: bouncer
run: pnpm install
- name: Run prettier check 🎨
working-directory: bouncer
run: pnpm prettier:check
- name: Run eslint check 📝
working-directory: bouncer
run: pnpm eslint:check
- name: Run typescript check 📝
working-directory: bouncer
run: pnpm tsc --noEmit
lint-ci-workflows:
runs-on: namespace-profile-default
steps:
- name: Checkout 🛒
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Check workflow files 📝
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
./actionlint -color -shellcheck=
shell: bash
lint-dockerfiles:
runs-on: namespace-profile-default
strategy:
matrix:
dockerfile:
- chainflip-broker-api
- chainflip-cli
- chainflip-engine
- chainflip-lp-api
- chainflip-node
environment:
- development
- production
include:
- dockerfile: rust-base
environment: development
- dockerfile: generate-genesis-keys
environment: development
- dockerfile: chainflip-ingress-egress-tracker
environment: development
steps:
- name: Checkout 🛒
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Login to DockerHub 🔑
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
with:
username: ${{ secrets.CF_DOCKERHUB_USERNAME }}
password: ${{ secrets.CF_DOCKERHUB_TOKEN }}
- name: Lint 🐳🔬
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: ci/docker/${{ matrix.environment }}/${{ matrix.dockerfile }}.Dockerfile