-
Notifications
You must be signed in to change notification settings - Fork 44
116 lines (92 loc) · 3.2 KB
/
validations.yaml
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
name: "Validations"
on:
workflow_dispatch:
inputs:
run-tmate:
description: "Start a tmate session"
required: false
default: ""
tmate-duration:
description: "Tmate session duration"
required: false
default: 5
push:
branches:
- main
pull_request:
jobs:
Static-Analysis:
name: "Static analysis"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Bootstrap environment
uses: ./.github/actions/bootstrap
- name: Run static analysis
run: make static-analysis
Unit-Test:
name: "Unit tests"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Bootstrap environment
uses: ./.github/actions/bootstrap
- name: Run unit tests
run: make unit
- uses: actions/upload-artifact@v2
with:
name: unit-test-results
path: test/results/**/*
Integration-Test:
name: "Integration tests"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Bootstrap environment
uses: ./.github/actions/bootstrap
- name: Enable systemd for podman socket activation
run: |
set -x
loginctl enable-linger $(whoami)
# we need to make certain that the bus instance is up and ready before systemctl attempts to use it.
# if we can figure a non-racey way to do this, that would be nice.
sleep 5
export XDG_RUNTIME_DIR=/run/user/$UID
mkdir -p $HOME/.config/systemd/user
systemctl --user enable --now podman.socket
sudo systemctl start podman.socket
- name: Setup tmate session
if: ${{ github.event.inputs.run-tmate == 'true' }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: ${{ fromJSON(github.event.inputs.tmate-duration) }}
with:
limit-access-to-actor: true
- name: Build key for test-fixture cache
run: make integration-fingerprint
- name: Restore integration test-fixture cache
uses: actions/[email protected]
with:
path: ${{ github.workspace }}/test/integration/test-fixtures/cache
key: ${{ runner.os }}-integration-test-cache-${{ hashFiles('test/integration/test-fixtures/cache.fingerprint') }}
- name: Build key for tool cache
run: make integration-tools-fingerprint
- name: Restore integration tool cache
id: integration-tool-cache
uses: actions/[email protected]
with:
path: ${{ github.workspace }}/test/integration/tools/cache
key: ${{ runner.os }}-integration-tools-cache-${{ hashFiles('test/integration/tools/cache.fingerprint') }}
- name: (cache-hit) Load integration tool cache
if: steps.integration-tool-cache.outputs.cache-hit == 'true'
run: make integration-tools-load
- name: Run integration tests
run: make integration
Build-Snapshot-Artifacts:
name: "Build snapshot artifacts"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Bootstrap environment
uses: ./.github/actions/bootstrap
- name: Build snapshot artifacts
run: make snapshot