-
-
Notifications
You must be signed in to change notification settings - Fork 96
119 lines (95 loc) · 2.78 KB
/
Copy pathci.yml
File metadata and controls
119 lines (95 loc) · 2.78 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
---
name: "ci"
# yamllint disable-line rule:truthy
on:
push:
branches:
- master
pull_request:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: test (dokku ${{ matrix.dokku_version }})
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
dokku_version:
- 0.38.3
env:
DOKKU_VERSION: ${{ matrix.dokku_version }}
steps:
- name: Checkout
uses: actions/checkout@v7.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Bring up the test stack
run: make setup
- name: Run lint
run: make lint
- name: Run unit tests
run: make unit-tests
- name: Collect compose logs on failure
if: failure()
run: make logs > tmp/compose-logs.txt || true
- name: Upload compose logs on failure
if: failure()
uses: actions/upload-artifact@v7
with:
name: compose-logs-dokku-${{ matrix.dokku_version }}
path: tmp/compose-logs.txt
if-no-files-found: ignore
- name: Tear down the test stack
if: always()
run: make clean
test-native:
name: test-native (dokku ${{ matrix.dokku_version }})
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
dokku_version:
- 0.38.3
env:
DOKKU_VERSION: ${{ matrix.dokku_version }}
DOKKU_TAG: v${{ matrix.dokku_version }}
steps:
- name: Checkout
uses: actions/checkout@v7.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Install bats
run: sudo apt-get update && sudo apt-get install -y bats
- name: Bootstrap dokku and bring up Pebble services
run: make setup-native
- name: Run unit tests
run: make unit-tests-native
- name: Collect diagnostic logs on failure
if: failure()
run: |
mkdir -p tmp
make logs > tmp/compose-logs-native.txt || true
{
echo "### dokku --version"
dokku --version || true
echo
echo "### nginx -t"
sudo nginx -t || true
echo
echo "### journalctl -n 500"
sudo journalctl -n 500 --no-pager || true
} > tmp/native-diag.txt || true
- name: Upload diagnostic logs on failure
if: failure()
uses: actions/upload-artifact@v7
with:
name: native-diag-dokku-${{ matrix.dokku_version }}
path: |
tmp/compose-logs-native.txt
tmp/native-diag.txt
if-no-files-found: ignore
- name: Tear down the Pebble services
if: always()
run: make clean-native