Add namespace replace permissions flow #1
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: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| packages: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| HUBUUM_INTEGRATION_SERVER_IMAGE: ghcr.io/hubuum/hubuum-server:no-tls-main | |
| jobs: | |
| test: | |
| name: Unit and Behavior Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo Artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Run Test Suite | |
| run: cargo test | |
| integration: | |
| name: Integration Tests (Docker) | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo Artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Authenticate to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ secrets.GHCR_USERNAME || github.actor }} | |
| password: ${{ secrets.GHCR_TOKEN || secrets.GITHUB_TOKEN }} | |
| - name: Run Integration Test Suite | |
| run: cargo test --features integration-tests --test container_integration -- --ignored --nocapture |