-
Notifications
You must be signed in to change notification settings - Fork 5
79 lines (68 loc) · 2.39 KB
/
devcontainer.yml
File metadata and controls
79 lines (68 loc) · 2.39 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
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 (Block egress traffic: Only allow calls to allowed endpoints)"
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: block
allowed-endpoints: >+
_http._tcp.deb.debian.org:443
*.data.mcr.microsoft.com:443
api.github.com:443
auth.docker.io:443
containers.dev:443
deb.debian.org:443
deb.debian.org:80
debian.map.fastlydns.net:443
debian.map.fastlydns.net:80
dl.google.com:443
files.pythonhosted.org:443
github.com:443
go.dev:443
index.rubygems.org:443
mcr.microsoft.com:443
nodejs.org:443
www.plantuml.com:443
plantuml.com:443
plantuml.com:80
production.cloudflare.docker.com:443
proxy.golang.org:443
pypi.org:443
registry-1.docker.io:443
registry.npmjs.org:443
rubygems.org:443
storage.googleapis.com:443
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Cache Docker layers
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
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@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Build DevContainer image
uses: devcontainers/ci@b63b30de439b47a52267f241112c5b453b673db5 # v0.3.1900000449
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