jj-run: add JJ_CHANGE_ID, JJ_COMMIT_ID, JJ_COMMIT_TIMESTAMP env vars #469
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: Dagger Tests | |
| on: | |
| push: | |
| paths: | |
| - "**/*.go" | |
| - "go.mod" | |
| - "go.sum" | |
| - ".golangci.yml" | |
| - ".dagger/**" | |
| - ".github/workflows/dagger-tests.yml" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Run all tests with Dagger | |
| uses: dagger/dagger-for-github@d913e70051faf3b907d4dd96ef1161083c88c644 # v8.2.0 | |
| with: | |
| version: "0.19.7" | |
| verb: call | |
| args: test --format=testname | |
| cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }} | |
| - name: Display test summary | |
| if: success() | |
| run: | | |
| { | |
| echo "## ✅ Test Results" | |
| echo "" | |
| echo "All Go projects tested successfully using Dagger." | |
| echo "" | |
| echo "**Test Environment:**" | |
| echo "- Container: \`golang:1.24.7\`" | |
| echo "- Test runner: \`gotestsum\`" | |
| echo "- Parallelism: Dagger internal (18 projects)" | |
| echo "- Dagger version: \`0.19.7\`" | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| lint: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Run lint with Dagger | |
| uses: dagger/dagger-for-github@d913e70051faf3b907d4dd96ef1161083c88c644 # v8.2.0 | |
| with: | |
| version: "0.19.7" | |
| verb: call | |
| args: lint | |
| cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }} | |
| - name: Display lint summary | |
| if: success() | |
| run: | | |
| { | |
| echo "## ✅ Lint Results" | |
| echo "" | |
| echo "All Go code passed linting checks using Dagger." | |
| echo "" | |
| echo "**Lint Environment:**" | |
| echo "- golangci-lint: \`golangci/golangci-lint:v2.6.1\`" | |
| echo "- uselesswrapper: \`golang:1.24.7\`" | |
| echo "- Dagger version: \`0.19.7\`" | |
| echo "" | |
| echo "**Checks Performed:**" | |
| echo "- golangci-lint on workspace root" | |
| echo "- uselesswrapper on workspace root" | |
| echo "- golangci-lint on .dagger module" | |
| } >> "$GITHUB_STEP_SUMMARY" |