[CDTOOL-1262] Move resource-link under service command
#4764
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: Test | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - labeled | |
| - unlabeled | |
| branches: | |
| - main | |
| # Stop any in-flight CI jobs when a new commit is pushed. | |
| concurrency: | |
| group: ${{ github.ref_name }} | |
| cancel-in-progress: true | |
| jobs: | |
| changelog: | |
| if: github.actor != 'dependabot[bot]' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: dangoslen/changelog-enforcer@v3 | |
| config: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Checkout code" | |
| uses: actions/checkout@v6 | |
| - name: "Install Rust" | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: "Generate static app config" | |
| run: make config | |
| - name: "Config Artifact" | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: config-artifact-${{ github.sha }} | |
| path: pkg/config/config.toml | |
| lint: | |
| needs: [config] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Checkout code" | |
| uses: actions/checkout@v6 | |
| - name: "Install Rust" | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.24.x | |
| - name: "Install dependencies" | |
| run: make mod-download | |
| shell: bash | |
| - name: "Config Artifact" | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: config-artifact-${{ github.sha }} | |
| - name: "Move Config" | |
| run: mv config.toml pkg/config/config.toml | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: v2.4 | |
| only-new-issues: true | |
| test: | |
| needs: [config] | |
| strategy: | |
| matrix: | |
| tinygo-version: [0.31.2] | |
| go-version: [1.24.x] | |
| node-version: [18] | |
| platform: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: "Checkout code" | |
| uses: actions/checkout@v6 | |
| - name: "Install Go" | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| # IMPORTANT: Disable caching to prevent cache restore errors later. | |
| cache: false | |
| - uses: acifani/setup-tinygo@v2 | |
| with: | |
| tinygo-version: ${{ matrix.tinygo-version }} | |
| - name: "Install Rust" | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: "Add wasm32-wasip1 Rust target" | |
| run: rustup target add wasm32-wasip1 --toolchain stable | |
| - name: "Validate Rust toolchain" | |
| run: rustup show && rustup target list --installed --toolchain stable | |
| shell: bash | |
| - name: "Install Node" | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: "Config Artifact" | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: config-artifact-${{ github.sha }} | |
| - name: "Move Config" | |
| run: mv config.toml pkg/config/config.toml | |
| - name: "Modify git cloned repo files 'modified' times" | |
| run: go run ./scripts/go-test-cache/main.go | |
| # NOTE: Windows should fail quietly running pre-requisite target of `test`. | |
| # | |
| # On Windows, executing `make config` directly works fine. | |
| # But when `config` is a pre-requisite to running `test`, it fails. | |
| # But only when run via GitHub Actions. | |
| # The ../../scripts/config.sh isn't run because you can't nest PowerShell instances. | |
| # Each GitHub Action 'run' step is a PowerShell instance. | |
| # And each instance is run as: powershell.exe -command ". '...'" | |
| - name: "Test suite" | |
| run: make test | |
| shell: bash | |
| env: | |
| # NOTE: The following lets us focus the test run while debugging. | |
| # TEST_ARGS: "-run TestBuild ./pkg/commands/compute/..." | |
| TEST_COMPUTE_INIT: true | |
| TEST_COMPUTE_BUILD: true | |
| TEST_COMPUTE_DEPLOY: true | |
| docker-builds: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Checkout code" | |
| uses: actions/checkout@v6 | |
| - name: Build docker images | |
| run: | | |
| for dockerFile in Dockerfile*; do docker build -f $dockerFile . ; done | |
| golangci-latest: | |
| name: lint-latest (informational) | |
| needs: [config] | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download config artifact | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: config-artifact-${{ github.sha }} | |
| path: pkg/config | |
| - name: Verify embedded config exists | |
| run: | | |
| test -f pkg/config/config.toml || { echo "missing pkg/config/config.toml"; ls -la pkg/config; exit 1; } | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.24.x | |
| - name: Run golangci-lint@latest | |
| id: lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: latest | |
| only-new-issues: true | |
| continue-on-error: true | |
| - name: Report lint summary | |
| run: | | |
| if [ "${{ steps.lint.outcome }}" == "success" ]; then | |
| echo "✅ golangci-lint@latest passed." >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "⚠️ golangci-lint@latest failed (informational only)." >> $GITHUB_STEP_SUMMARY | |
| fi |