-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit 3634bd9. # Conflicts: # .github/workflows/dagger-golangci-lint.yml # .github/workflows/go.yml # dagger.json # dagger/main.go
- Loading branch information
Showing
10 changed files
with
66 additions
and
344 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,66 @@ | ||
--- | ||
name: Go | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- "release-*" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
# Minimal permissions to be inherited by any job that don't declare it's own permissions | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
|
||
supportedVersions: | ||
name: Fetch supported Go versions | ||
runs-on: ubuntu-latest | ||
outputs: | ||
supported_versions: ${{ steps.matrix.outputs.supported_versions }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- name: Read supported_go_versions.txt | ||
id: matrix | ||
run: | | ||
versions=$(cat supported_go_versions.txt) | ||
matrix="[$(echo "$versions" | sed 's/\(.*\)/"\1"/' | paste -s -d,)]" | ||
echo "supported_versions=$matrix" >> $GITHUB_OUTPUT | ||
test: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
needs: supportedVersions | ||
|
||
strategy: | ||
matrix: | ||
go_version: ${{ fromJSON(needs.supportedVersions.outputs.supported_versions) }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Run tests and check license | ||
uses: dagger/dagger-for-github@847ae4458ef34fe9b5f566655957bde6d4891112 # v7.0.3 | ||
with: | ||
version: "latest" | ||
verb: call | ||
args: -vvv --src . make --go-version ${{matrix.go_version}} --args 'check_license test' | ||
|
||
- name: Run style and unused | ||
uses: dagger/dagger-for-github@847ae4458ef34fe9b5f566655957bde6d4891112 # v7.0.3 | ||
if: ${{ matrix.go_version == '1.21' }} | ||
with: | ||
version: "latest" | ||
verb: call | ||
args: -vvv --src . make --args 'check_license test' | ||
--- | ||
name: Go | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- "release-*" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
# Minimal permissions to be inherited by any job that don't declare it's own permissions | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
supportedVersions: | ||
name: Fetch supported Go versions | ||
runs-on: ubuntu-latest | ||
outputs: | ||
supported_versions: ${{ steps.matrix.outputs.supported_versions }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- name: Read supported_go_versions.txt | ||
id: matrix | ||
run: | | ||
versions=$(cat supported_go_versions.txt) | ||
matrix="[$(echo "$versions" | sed 's/\(.*\)/"\1"/' | paste -s -d,)]" | ||
echo "supported_versions=$matrix" >> $GITHUB_OUTPUT | ||
test: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
needs: supportedVersions | ||
|
||
strategy: | ||
matrix: | ||
go_version: ${{ fromJSON(needs.supportedVersions.outputs.supported_versions) }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Set up Go ${{ matrix.go_version }} | ||
uses: actions/[email protected] | ||
with: | ||
go-version: ${{ matrix.go_version }} | ||
|
||
- name: Cache Go modules | ||
id: cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: v1-go${{ matrix.go_version }} | ||
|
||
- name: Run tests and check license | ||
run: make check_license test | ||
env: | ||
CI: true | ||
|
||
- name: Run style and unused | ||
if: ${{ matrix.go_version == '1.21' }} | ||
run: make style unused |
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.