-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (87 loc) · 2.28 KB
/
continuous-integration.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
name: Continuous Integration (CI)
on: pull_request
env:
# Forcing Earthly to use colours, to make reading output easier.
FORCE_COLOR: 1
jobs:
formatting:
name: Formatting
runs-on: ubuntu-latest
strategy:
matrix:
language: [rust, python, shell]
steps:
- name: Download Earthly.
uses: earthly/actions-setup@v1
with:
version: v0.8.15
- name: Checkout code.
uses: actions/checkout@v4
- name: Check formatting.
run: earthly --ci +check-${{ matrix.language }}-formatting
linting:
name: Linting
runs-on: ubuntu-latest
strategy:
matrix:
language: [rust, shell]
steps:
- name: Download Earthly.
uses: earthly/actions-setup@v1
with:
version: v0.8.15
- name: Checkout code.
uses: actions/checkout@v4
- name: Check linting.
run: earthly --ci +check-${{ matrix.language }}-linting
compile:
name: Compile
runs-on: ubuntu-latest
steps:
- name: Download Earthly.
uses: earthly/actions-setup@v1
with:
version: v0.8.15
- name: Checkout code.
uses: actions/checkout@v4
- name: Compile.
run: earthly --ci +compile
unit-test:
name: Unit Test
runs-on: ubuntu-latest
steps:
- name: Download Earthly.
uses: earthly/actions-setup@v1
with:
version: v0.8.15
- name: Checkout code.
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Unit test.
run: earthly --ci +unit-test
static-binary-test:
name: Static Binary Test
runs-on: ubuntu-latest
steps:
- name: Download Earthly.
uses: earthly/actions-setup@v1
with:
version: v0.8.15
- name: Checkout code.
uses: actions/checkout@v4
- name: Static binary test.
run: earthly --ci +static-binary-test
end-to-end-test:
name: End to End Test
runs-on: ubuntu-latest
steps:
- name: Download Earthly.
uses: earthly/actions-setup@v1
with:
version: v0.8.15
- name: Checkout code.
uses: actions/checkout@v4
- name: End to End test.
run: earthly --ci +end-to-end-test