-
Notifications
You must be signed in to change notification settings - Fork 5
52 lines (41 loc) · 1.48 KB
/
devcontainer.yml
File metadata and controls
52 lines (41 loc) · 1.48 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
name: DevContainer
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
permissions:
contents: read
jobs:
devcontainer:
name: DevContainer Build & Test
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v5.0.0
- name: Cache Docker layers
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: /tmp/.buildx-cache
key: devcontainer-${{ runner.os }}-${{ github.sha }}
restore-keys: |
devcontainer-${{ runner.os }}-
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- name: Build DevContainer image
uses: devcontainers/ci@8bf61b26e9c3a98f69cb6ce2f88d24ff59b785c6 # v0.3.1900000417
with:
runCmd: |
echo "Installing test dependencies..."
pip install -e .[development,docs,casts]
echo "Running pre-commit checks..."
pre-commit run --all-files
echo "Running unit tests..."
python -m pytest tests
echo "Building documentation..."
make -C doc html
make -C doc/landing-page html