-
Notifications
You must be signed in to change notification settings - Fork 223
149 lines (116 loc) · 3.37 KB
/
ci.yml
File metadata and controls
149 lines (116 loc) · 3.37 KB
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: CI
on:
push:
branches:
- main
pull_request:
schedule:
- cron: "0 0 * * *"
env:
RUST_CACHE_KEY: rust-cache-20241114
# disable incremental builds in CI, it's not needed
CARGO_INCREMENTAL: 0
jobs:
sqlx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: taiki-e/install-action@v2
with:
tool: just,sqlx-cli,fd-find
- name: restore build & cargo cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: ${{ env.RUST_CACHE_KEY }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: run sqlx migration up & down
run: |
just sqlx-migrate-run \
sqlx-check \
sqlx-migrate-revert
- name: shut down test environment
if: ${{ always() }}
run: just compose-down-and-wipe
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: taiki-e/install-action@v2
with:
tool: just
- name: restore build & cargo cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: ${{ env.RUST_CACHE_KEY }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: run tests
run: just run-tests run-builder-tests
- name: shut down test environment
if: ${{ always() }}
run: just compose-down-and-wipe
GUI_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@v1.3.1
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to
# "false" if our workflow needs parts
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: taiki-e/install-action@v2
with:
tool: just
- name: Run GUI tests
run: just run-gui-tests
- name: shut down test environment
if: ${{ always() }}
run: just compose-down-and-wipe
lint-rs:
name: rust linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: taiki-e/install-action@v2
with:
tool: just,fd-find,cargo-machete,cargo-udeps,cargo-sort
- name: restore build & cargo cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: linters-${{ env.RUST_CACHE_KEY }}
- run: |
just lint
just lint-dependencies-udeps
lint-js:
name: js linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: denoland/setup-deno@v2
- uses: taiki-e/install-action@v2
with:
tool: just
- run: just lint-js
lint-actions:
name: gh actions linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# We check that all github actions workflows have valid syntax
- name: Validate YAML file
uses: raven-actions/actionlint@v2
with:
files: .github/workflow/*
flags: "-ignore SC2086" # ignore some shellcheck errors