diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b48a669..45c2b39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ name: CI -on: [push, pull_request] +on: [ push, pull_request ] jobs: ci: @@ -26,6 +26,11 @@ jobs: - name: Run tests run: cargo test + - name: Dry run + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_API_READ_TOKEN }} + run: cargo run -- --only-print-plan github + - name: Build the Docker container run: docker build -t sync-team . diff --git a/.github/workflows/dry_run.yml b/.github/workflows/dry_run.yml new file mode 100644 index 0000000..357609d --- /dev/null +++ b/.github/workflows/dry_run.yml @@ -0,0 +1,24 @@ +# Smoke test that checks if we can download team data and read from the GitHub API. +name: Dry run + +on: + workflow_dispatch: + schedule: + # Try to dry run every 4 hours + - cron: "0 */4 * * *" + +jobs: + run: + name: Perform a dry run + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + - uses: Swatinem/rust-cache@v1 + - name: Dry run + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_API_READ_TOKEN }} + run: cargo run -- --only-print-plan github