Skip to content

Smoke

Smoke #28992

Workflow file for this run

# 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
download-cli:
uses: ./.github/workflows/download-cli.yml
permissions:
contents: read
secrets:
gh_token: ${{ secrets.GITHUB_TOKEN }}
smoke:
runs-on: ubuntu-latest
needs: [suites, download-cli]
strategy:
fail-fast: false
matrix:
suite: ${{ fromJSON(needs.suites.outputs.suites) }}
steps:
- uses: actions/checkout@v4
- name: Download CLI artifact
uses: actions/download-artifact@v4
with:
name: dependabot-cli
- name: Make CLI executable
run: |
chmod +x dependabot
./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.