Smoke #19557
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Runs all ecosystems cached and concurrently. | |
name: Smoke | |
on: # yamllint disable-line rule:truthy | |
workflow_dispatch: | |
pull_request: | |
branches: ["main"] | |
schedule: | |
- cron: "0 * * * *" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
suites: | |
uses: ./.github/workflows/list-suites.yml | |
smoke: | |
runs-on: ubuntu-latest | |
needs: suites | |
strategy: | |
fail-fast: false | |
matrix: | |
suite: ${{ fromJSON(needs.suites.outputs.suites) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download CLI | |
run: | | |
gh release download --repo dependabot/cli -p "*linux-amd64.tar.gz" | |
tar xzvf *.tar.gz >/dev/null 2>&1 | |
./dependabot --version | |
# Download the Proxy cache. The job is ideally 100% cached so no real calls are made. | |
- name: Download artifacts | |
run: | | |
set +e | |
script/download-cache.sh ${{ matrix.suite }} | |
# If the previous command failed, and this is a scheduled run, fail the job. | |
if [ $? -ne 0 ] && [ "${{ github.event_name }}" == "schedule" ]; then | |
exit 1 | |
fi | |
- name: ${{ matrix.suite }} | |
env: | |
LOCAL_GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
set -o pipefail | |
./dependabot test -f=tests/smoke-${{ matrix.suite }}.yaml -o=result.yaml --timeout 20m --cache=cache 2>&1 | tee -a log.txt | |
- name: Diff | |
if: always() | |
continue-on-error: true | |
run: diff --ignore-space-change tests/smoke-${{ matrix.suite}}.yaml result.yaml && echo "Contents are identical" || exit 0 | |
- name: Create summary | |
run: tail -n100 log.txt | grep -P '\d+/\d+ calls cached \(\d+%\)' >> $GITHUB_STEP_SUMMARY | |
# No upload at the end: | |
# - If a test is uncachable in some regard, the cache would grow unbound. | |
# - We might want to consider erroring if the cache is changed. |