-
Notifications
You must be signed in to change notification settings - Fork 78
55 lines (47 loc) · 1.45 KB
/
main.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
on:
push:
branches:
- master
pull_request:
jobs:
rust:
name: Rust projects
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust stable
run: rustup update stable && rustup default stable
- name: Run rustfmt
run: cargo fmt --all -- --check
- name: Run the test suite
run: cargo test --all
- name: Run clippy
run: cargo clippy --all -- -Dwarnings
terraform:
name: Terraform configuration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Ensure the terraform files are formatted correctly
run: terraform fmt -check -diff -recursive
actions-js:
name: GitHub Actions (JS)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Ensure the bundled action is the same as the source code
run: |
for action in $(ls github-actions/); do
if [[ -f "github-actions/${action}/package.json" ]]; then
pushd "github-actions/${action}"
sha256sum dist/* > "/tmp/sha256-${action}-before"
npm install
npm run build
sha256sum dist/* > "/tmp/sha256-${action}-after"
diff -u --color "/tmp/sha256-${action}-before" "/tmp/sha256-${action}-after"
popd
fi
done