Repository navigation
remove auto-dependabot #108
Workflow file for this run
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: dynamic | |
| on: pull_request | |
| permissions: | |
| contents: read | |
| packages: read | |
| jobs: | |
| check-test: | |
| strategy: | |
| matrix: | |
| settings: | |
| - host: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| cross: false | |
| - host: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| cross: false | |
| - host: ubuntu-latest | |
| target: aarch64-unknown-linux-gnu | |
| cross: true | |
| - host: ubuntu-latest | |
| target: x86_64-unknown-linux-musl | |
| cross: true | |
| - host: ubuntu-latest | |
| target: aarch64-unknown-linux-musl | |
| cross: true | |
| - host: macos-latest | |
| target: aarch64-apple-darwin | |
| cross: false | |
| - host: macos-latest | |
| target: x86_64-apple-darwin | |
| cross: false | |
| runs-on: ${{ matrix.settings.host }} | |
| name: test / ${{ matrix.settings.host }} / ${{ matrix.settings.target }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| fetch-depth: 2 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| targets: ${{ matrix.settings.target }} | |
| - uses: taiki-e/install-action@nextest | |
| - uses: Swatinem/rust-cache@v2.7.5 | |
| with: | |
| key: test_${{ matrix.settings.host }}_${{ matrix.settings.target }} | |
| - name: cross | |
| if: matrix.settings.cross | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cross | |
| - name: tests | |
| run: | | |
| HAS_DOCKER=${{ !matrix.settings.cross && matrix.settings.host == 'ubuntu-latest' }} | |
| CARGO_COMMAND=${{ matrix.settings.cross && 'cross' || 'cargo' }} | |
| FEATURES=${{ (!matrix.settings.cross && matrix.settings.host == 'ubuntu-latest') && 'test-docker-interop' || 'default' }} | |
| if [ "$HAS_DOCKER" = "true" ]; then | |
| docker login -u fossaeng --password-stdin <<< ${{ secrets.DOCKERHUB_API_KEY }} | |
| docker login quay.io -u fossa+sparkle --password-stdin <<< ${{ secrets.QUAY_API_KEY }} | |
| docker login ghcr.io -u ${{ github.actor }} --password-stdin <<< ${{ github.token }} | |
| fi | |
| if [ "$CARGO_COMMAND" = "cross" ]; then | |
| $CARGO_COMMAND test --all-targets --features $FEATURES --target ${{ matrix.settings.target }} | |
| else | |
| cargo nextest run --all-targets --features $FEATURES --target ${{ matrix.settings.target }} | |
| fi | |
| shell: bash | |
| - name: custom tests | |
| if: ${{ !matrix.settings.cross }} | |
| run: >- | |
| cargo nextest run | |
| --all-targets --target ${{ matrix.settings.target }} | |
| --features test-custom-namespace | |
| docker_like_custom_base_namespace | |
| env: | |
| OCI_DEFAULT_BASE: host.dev | |
| OCI_DEFAULT_NAMESPACE: somecorp/someproject | |
| shell: bash | |
| - name: doc tests | |
| if: ${{ !matrix.settings.cross }} | |
| run: cargo test --doc --target ${{ matrix.settings.target }} | |
| shell: bash | |
| # We can't run the integration tests on cross compiled hosts because they try to run circe itself with `cargo run`. | |
| # For the purposes of the integration tests today, if they work on the standard host we're confident they'll work | |
| # when cross compiled, but if this ever changes we can revisit this setup. | |
| - name: integration tests (unix) | |
| if: ${{ !matrix.settings.cross && matrix.settings.host != 'windows-latest' }} | |
| run: | | |
| HAS_DOCKER=${{ matrix.settings.host == 'ubuntu-latest' }} | |
| FEATURES=${{ matrix.settings.host == 'ubuntu-latest' && 'test-docker-interop,test-integration' || 'test-integration' }} | |
| if [ "$HAS_DOCKER" = "true" ]; then | |
| docker login -u fossaeng --password-stdin <<< ${{ secrets.DOCKERHUB_API_KEY }} | |
| docker login quay.io -u fossa+sparkle --password-stdin <<< ${{ secrets.QUAY_API_KEY }} | |
| docker login ghcr.io -u ${{ github.actor }} --password-stdin <<< ${{ github.token }} | |
| fi | |
| curl https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash | |
| cargo build | |
| cargo nextest run -p circe_integration --features $FEATURES | |
| shell: bash | |
| - name: integration tests (windows) | |
| if: ${{ !matrix.settings.cross && matrix.settings.host == 'windows-latest' }} | |
| run: | | |
| iwr -useb https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.ps1 | iex | |
| cargo build | |
| cargo nextest run -p circe_integration --features test-integration | |
| shell: powershell |