Repository navigation
50 lines (45 loc) · 1.67 KB
/
Copy pathdevcontainer.yml
File metadata and controls
50 lines (45 loc) · 1.67 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
name: Devcontainer
# Builds the devcontainer that "Open in Codespaces" and the Labs page rely on,
# and runs the tests, lint and a simulated scan inside it (#101). Weekly too,
# so a broken setup step shows up without a change here. The base images are
# pinned in .devcontainer/**/Dockerfile, where Dependabot bumps them (#244).
on:
push:
branches: [ "main" ]
paths:
- ".devcontainer/**"
- ".github/workflows/devcontainer.yml"
pull_request:
paths:
- ".devcontainer/**"
- ".github/workflows/devcontainer.yml"
schedule:
- cron: "0 5 * * 1" # Mondays 05:00 UTC
workflow_dispatch:
permissions:
contents: read
jobs:
devcontainer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Build the devcontainer and run checks inside it
uses: devcontainers/ci@513af61f4de4f75d37e4438f184ba4358f0fc1ca # v0.3.1900000450
with:
push: never
runCmd: |
set -e
go version
make test
golangci-lint run
./subenum -simulate -seed 1 -stats run.json example.com > /dev/null
grep -q '"verdict": "complete"' run.json
- name: Build the labs devcontainer and run lab 1 inside it
uses: devcontainers/ci@513af61f4de4f75d37e4438f184ba4358f0fc1ca # v0.3.1900000450
with:
push: never
configFile: .devcontainer/labs/devcontainer.json
runCmd: |
set -e
./subenum -w examples/labs/words.txt -simulate-zone examples/labs/lab1-first-scan.zone -stats lab1.json lab.example
grep -q '"verdict": "complete"' lab1.json