Skip secret tests on dependabot #252
This file contains hidden or 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
| name: CI | |
| on: | |
| push: | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| name: test - ${{ matrix.target }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| runner: ubuntu-latest | |
| os: ubuntu | |
| # - target: aarch64-unknown-linux-gnu | |
| # runner: ubuntu-24.04-arm | |
| # os: ubuntu | |
| runs-on: ${{ matrix.runner }} | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: update apt cache | |
| run: sudo apt-get update | |
| - name: install protoc | |
| run: sudo apt-get install -y protobuf-compiler | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| rustflags: "" | |
| # dependabot does not have access to secrets, skip for dependency updates | |
| - name: Configure AWS credentials | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.AWS_LAMBDA_CI_ROLE_ARN }} | |
| aws-region: us-east-1 | |
| - name: Set secret test ARNS | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| run: | | |
| echo "TEST_SECRETSMANAGER_ARNS=${{ secrets.TEST_SECRETSMANAGER_ARNS }}" >> $GITHUB_ENV | |
| echo "TEST_PARAMSTORE_ARNS=${{ secrets.TEST_PARAMSTORE_ARNS }}" >> $GITHUB_ENV | |
| echo "TEST_ENVSECRET_ARNS=${{ secrets.TEST_ENVSECRET_ARNS }}" >> $GITHUB_ENV | |
| - uses: taiki-e/install-action@nextest | |
| - name: run tests | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: nextest | |
| args: run --target ${{ matrix.target }} --verbose | |
| # Check formatting with rustfmt | |
| formatting: | |
| name: cargo fmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Ensure rustfmt is installed and setup problem matcher | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| components: rustfmt | |
| rustflags: "" | |
| - name: Rustfmt Check | |
| uses: actions-rust-lang/rustfmt@v1 |