make github workflow jobs concurrent and add caching #4
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: Cypher Frontend CI | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'cypher/frontend/**' | |
| - '.github/workflows/cypher-frontend.yml' | |
| pull_request: | |
| paths: | |
| - 'cypher/frontend/**' | |
| - '.github/workflows/cypher-frontend.yml' | |
| env: | |
| PDS_EMAIL_FROM_ADDRESS: "noreply@blacksky.app" | |
| PDS_EMAIL_FROM_NAME: "noreply" | |
| PDS_MODERATION_EMAIL_FROM_NAME: "noreply" | |
| PDS_MODERATION_EMAIL_FROM_ADDRESS: "noreply@blacksky.app" | |
| PDS_HOSTNAME: "rsky.com" | |
| PDS_SERVICE_DID: "did:web:localho.st" | |
| PDS_SERVICE_HANDLE_DOMAINS: ".rsky.com" | |
| PDS_ADMIN_PASS: 3ed1c7b568d3328c44430add531a099f | |
| PDS_JWT_KEY_K256_PRIVATE_KEY_HEX: 9d5907143471e8f0e8df0f8b9512a8c5377878ee767f18fcf961055ecfc071cd | |
| # PDS_ADMIN_PASS: ${{ secrets.PDS_ADMIN_PASS }} | |
| # PDS_JWT_KEY_K256_PRIVATE_KEY_HEX: ${{ secrets.PDS_JWT_KEY_K256_PRIVATE_KEY_HEX }} | |
| PDS_MAILGUN_API_KEY: ${{ secrets.PDS_MAILGUN_API_KEY }} | |
| PDS_MAILGUN_DOMAIN: ${{ secrets.PDS_MAILGUN_DOMAIN }} | |
| #PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX: ${{ secrets.PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX }} | |
| #PDS_REPO_SIGNING_KEY_K256_PRIVATE_KEY_HEX: ${{ secrets.PDS_REPO_SIGNING_KEY_K256_PRIVATE_KEY_HEX }} | |
| PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX: fb478b39dd2ddf84bef135dd60f90381903eefadbb9df4b18a2b9b174ae72582 | |
| PDS_REPO_SIGNING_KEY_K256_PRIVATE_KEY_HEX: 71cfcf4882a6cff494c3d0affadd3858eb3a5838e7b5e15170e696a590a4fa01 | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: cypher-frontend | |
| - name: Run cargo check | |
| working-directory: cypher/frontend | |
| run: cargo check | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: cypher-frontend | |
| - name: Run cargo build | |
| working-directory: cypher/frontend | |
| run: cargo build --release | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: cypher-frontend | |
| - name: Run cargo test | |
| working-directory: cypher/frontend | |
| run: cargo test | |
| formatting: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: cypher-frontend | |
| - name: Run cargo fmt | |
| working-directory: cypher/frontend | |
| run: cargo fmt -- --check | |
| ci-success: | |
| runs-on: ubuntu-latest | |
| needs: [check, build, test, formatting] | |
| if: always() | |
| steps: | |
| - name: CI Success | |
| if: ${{ !contains(needs.*.result, 'failure') }} | |
| run: echo "All Cypher Frontend CI jobs passed!" | |
| - name: CI Failed | |
| if: ${{ contains(needs.*.result, 'failure') }} | |
| run: | | |
| echo "Some Cypher Frontend CI jobs failed!" | |
| exit 1 |