-
Notifications
You must be signed in to change notification settings - Fork 63
58 lines (49 loc) · 1.38 KB
/
docker-ci.yml
File metadata and controls
58 lines (49 loc) · 1.38 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
name: Docker CI
on:
push:
branches: [ master ]
paths:
- 'Dockerfile'
- 'docker-compose.yml'
- '.github/workflows/docker-ci.yml'
- 'ardupilot_methodic_configurator/**'
- 'tests/**'
- 'scripts/**'
- 'pyproject.toml'
pull_request:
branches: [ master ]
paths:
- 'Dockerfile'
- 'docker-compose.yml'
- '.github/workflows/docker-ci.yml'
- 'ardupilot_methodic_configurator/**'
- 'tests/**'
- 'scripts/**'
- 'pyproject.toml'
workflow_dispatch:
permissions:
contents: read
jobs:
docker-test:
name: Docker Build and Test
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
- name: Build and Run Tests
run: |
docker compose run --rm test
- name: Run Linter in Docker
if: always()
run: |
docker compose run --rm lint
- name: Cleanup
if: always()
run: |
docker compose down --volumes --remove-orphans