-
Notifications
You must be signed in to change notification settings - Fork 2
95 lines (88 loc) · 2.66 KB
/
devcontainer-ci.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
91
92
93
94
95
---
name: Devcontainer-based CI
on: # yamllint disable-line rule:truthy
push:
branches:
- main
- renovate/**
pull_request:
jobs:
build-devcontainer:
runs-on: ubuntu-latest
permissions:
contents: "read"
packages: "write"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Login to GitHub Container Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pre-build dev container image
uses: devcontainers/[email protected]
with:
cacheFrom: ghcr.io/${{ github.repository }}-devcontainer
imageName: ghcr.io/${{ github.repository }}-devcontainer
push: filter
refFilterForPush: refs/heads/main
just-check:
needs: build-devcontainer
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Validate justfile
uses: devcontainers/[email protected]
with:
cacheFrom: ghcr.io/${{ github.repository }}-devcontainer
push: never
runCmd: just just-check
format:
needs: just-check
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run formatting
uses: devcontainers/[email protected]
with:
cacheFrom: ghcr.io/${{ github.repository }}-devcontainer
push: never
runCmd: |
just just-format
just ruff-format
quick-lint:
needs: just-check
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run quick-lint
uses: devcontainers/[email protected]
with:
cacheFrom: ghcr.io/${{ github.repository }}-devcontainer
push: never
runCmd: |
just hadolint
just pyright
just renovate-validate
just ruff-check
just yamllint
pytest:
needs: just-check
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run pytest
uses: devcontainers/[email protected]
with:
cacheFrom: ghcr.io/${{ github.repository }}-devcontainer
push: never
runCmd: just pytest