-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (99 loc) · 3.31 KB
/
ci.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
name: ci
on:
push:
branches:
- master
release:
types: [created]
pull_request:
branches: [master]
permissions: read-all
jobs:
build:
uses: miracum/.github/.github/workflows/standard-build.yaml@3a6d6e823363d6a7b39daaadc24566130bddef38 # v1.12.10
permissions:
contents: write
id-token: write
packages: write
pull-requests: write
actions: read
security-events: write
with:
enable-build-test-layer: false
enable-upload-test-image: false
platforms: |
linux/amd64
linux/arm64
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
test:
needs:
- build
runs-on: ubuntu-24.04
steps:
# <https://docs.docker.com/storage/containerd/>
# via <https://github.com/docker/setup-buildx-action/issues/257>
- name: Set up containerd image store
shell: bash
run: |
[ -f /etc/docker/daemon.json ] || echo "{}" | sudo tee /etc/docker/daemon.json
jq '. | .+{"features": {"containerd-snapshotter": true}}' /etc/docker/daemon.json > /tmp/docker-daemon-with-containerd.json
sudo mv /tmp/docker-daemon-with-containerd.json /etc/docker/daemon.json
cat /etc/docker/daemon.json
sudo systemctl restart docker
docker info -f '{{ .DriverStatus }}'
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Download container image
if: ${{ github.event_name == 'pull_request' }}
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: ${{ needs.build.outputs.image-slug }}
path: /tmp
- name: Load image
if: ${{ github.event_name == 'pull_request' }}
run: |
ls -lar /tmp
docker load --input /tmp/image.tar
docker image ls -a
- name: Start compose fixtures
run: |
docker compose up wait-for-pathling
- name: Install .NET
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: "9.0.x"
- name: Run tests
env:
PATHLING_S3_IMPORT_IMAGE_TAG: ${{ needs.build.outputs.image-version }}
run: dotnet test src/PathlingS3Import.Tests.E2E --configuration=Release -l "console;verbosity=detailed"
- name: Print compose logs
if: always()
run: |
docker compose logs
docker compose down --volumes --remove-orphans
lint:
uses: miracum/.github/.github/workflows/standard-lint.yaml@3a6d6e823363d6a7b39daaadc24566130bddef38 # v1.12.10
permissions:
contents: read
pull-requests: write
issues: write
security-events: write
actions: read
with:
enable-validate-gradle-wrapper: false
codeql-languages: '["csharp"]'
enable-codeql: true
enable-verify-base-image-signature: false
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
release:
uses: miracum/.github/.github/workflows/standard-release.yaml@3a6d6e823363d6a7b39daaadc24566130bddef38 # v1.12.10
needs:
- build
permissions:
contents: write
pull-requests: write
issues: write
secrets:
semantic-release-token: ${{ secrets.MIRACUM_BOT_SEMANTIC_RELEASE_TOKEN }}