@@ -3,10 +3,10 @@ name: Smoke
33permissions :
44 contents : read
55
6- on :
6+ on : # yamllint disable-line rule:truthy
77 workflow_dispatch :
88 pull_request :
9- branches : [ "main" ]
9+ branches : ["main"]
1010 paths-ignore :
1111 - docs/**
1212 - README.md
@@ -31,55 +31,55 @@ jobs:
3131 matrix :
3232 suite : ${{ fromJSON(needs.suites.outputs.suites) }}
3333 steps :
34- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
35- with :
36- persist-credentials : false
34+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
35+ with :
36+ persist-credentials : false
3737
38- - name : Install Go
39- uses : actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
40- with :
41- go-version-file : go.mod
38+ - name : Install Go
39+ uses : actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
40+ with :
41+ go-version-file : go.mod
4242
43- - name : Install Dependabot CLI
44- run : go install github.com/dependabot/cli/cmd/dependabot@latest
43+ - name : Install Dependabot CLI
44+ run : go install github.com/dependabot/cli/cmd/dependabot@latest
4545
46- - name : Download smoke test
47- env :
48- SUITE : ${{ matrix.suite }}
49- run : |
50- gh api "repos/dependabot/smoke-tests/contents/tests/smoke-${SUITE}.yaml" -H "Accept: application/vnd.github.raw" > smoke.yaml
46+ - name : Download smoke test
47+ env :
48+ SUITE : ${{ matrix.suite }}
49+ run : |
50+ gh api "repos/dependabot/smoke-tests/contents/tests/smoke-${SUITE}.yaml" -H "Accept: application/vnd.github.raw" > smoke.yaml
5151
52- # Download the Proxy cache. The job is ideally 100% cached so no real calls are made.
53- - name : Download cache
54- env :
55- SUITE : ${{ matrix.suite }}
56- run : |
57- gh run download --repo dependabot/smoke-tests --name "cache-${SUITE}" --dir cache
52+ # Download the Proxy cache. The job is ideally 100% cached so no real calls are made.
53+ - name : Download cache
54+ env :
55+ SUITE : ${{ matrix.suite }}
56+ run : |
57+ gh run download --repo dependabot/smoke-tests --name "cache-${SUITE}" --dir cache
5858
59- - name : Build proxy image
60- run : docker build -t "dependabot/proxy:latest" .
59+ - name : Build proxy image
60+ run : docker build -t "dependabot/proxy:latest" .
6161
62- - name : ${{ matrix.suite }}
63- env :
64- LOCAL_GITHUB_ACCESS_TOKEN : ${{ secrets.GITHUB_TOKEN }}
65- run : |
66- set -o pipefail
67- dependabot test \
68- -f=smoke.yaml \
69- -o=result.yaml \
70- --cache=cache \
71- --timeout=20m \
72- --proxy-image=dependabot/proxy:latest \
73- 2>&1 | tee -a log.txt
62+ - name : ${{ matrix.suite }}
63+ env :
64+ LOCAL_GITHUB_ACCESS_TOKEN : ${{ secrets.GITHUB_TOKEN }}
65+ run : |
66+ set -o pipefail
67+ dependabot test \
68+ -f=smoke.yaml \
69+ -o=result.yaml \
70+ --cache=cache \
71+ --timeout=20m \
72+ --proxy-image=dependabot/proxy:latest \
73+ 2>&1 | tee -a log.txt
7474
75- - name : Diff
76- if : always()
77- continue-on-error : true
78- run : diff --ignore-space-change smoke.yaml result.yaml && echo "Contents are identical"
75+ - name : Diff
76+ if : always()
77+ continue-on-error : true
78+ run : diff --ignore-space-change smoke.yaml result.yaml && echo "Contents are identical"
7979
80- - name : Create summary
81- run : tail -n100 log.txt | grep -P '\d+/\d+ calls cached \(\d+%\)' >> $GITHUB_STEP_SUMMARY
80+ - name : Create summary
81+ run : tail -n100 log.txt | grep -P '\d+/\d+ calls cached \(\d+%\)' >> $GITHUB_STEP_SUMMARY
8282
83- # No upload at the end:
84- # - If a test is uncachable in some regard, the cache would grow unbound.
85- # - We might want to consider erroring if the cache is changed.
83+ # No upload at the end:
84+ # - If a test is uncachable in some regard, the cache would grow unbound.
85+ # - We might want to consider erroring if the cache is changed.
0 commit comments