Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "ci: daggerize test and lint pipelines (#1534)" #1717

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions .github/workflows/dagger-golangci-lint.yml

This file was deleted.

127 changes: 66 additions & 61 deletions .github/workflows/go.yml
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/setup-go@v5.0.2
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
4 changes: 0 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ run:
skip-files:
# Skip autogenerated files.
- ^.*\.(pb|y)\.go$
- dagger/dagger.gen.go
skip-dirs:
- dagger/internal


output:
sort-results: true
Expand Down
13 changes: 0 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,6 @@ test: deps common-test
.PHONY: test-short
test-short: deps common-test-short

# Overriding Makefile.common check_license target to add
# dagger paths
.PHONY: common-check_license
common-check_license:
@echo ">> checking license header"
@licRes=$$(for file in $$(find . -type f -iname '*.go' ! -path './vendor/*' ! -path './dagger/internal/*') ; do \
awk 'NR<=3' $$file | grep -Eq "(Copyright|generated|GENERATED)" || echo $$file; \
done); \
if [ -n "$${licRes}" ]; then \
echo "license header checking failed:"; echo "$${licRes}"; \
exit 1; \
fi

.PHONY: generate-go-collector-test-files
file := supported_go_versions.txt
VERSIONS := $(shell cat ${file})
Expand Down
15 changes: 0 additions & 15 deletions dagger.json

This file was deleted.

4 changes: 0 additions & 4 deletions dagger/.gitattributes

This file was deleted.

4 changes: 0 additions & 4 deletions dagger/.gitignore

This file was deleted.

40 changes: 0 additions & 40 deletions dagger/go.mod

This file was deleted.

87 changes: 0 additions & 87 deletions dagger/go.sum

This file was deleted.

Loading
Loading