diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 82f1556..5424226 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -9,20 +9,20 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: '1.20' - - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v3 - name: Granting private modules access run: | git config --global url."https://${{ secrets.REPO_PAT }}:x-oauth-basic@github.com/nucleuscloud".insteadOf "https://github.com/nucleuscloud" + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version-file: go.mod + - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: version: latest - args: --timeout=3m diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 00e550f..67bc87b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,15 +13,19 @@ jobs: goreleaser: runs-on: ubuntu-latest steps: - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: '1.20' - - uses: actions/checkout@v3 with: fetch-depth: 0 + - name: Granting private modules access + run: | + git config --global url."https://${{ secrets.REPO_PAT }}:x-oauth-basic@github.com/nucleuscloud".insteadOf "https://github.com/nucleuscloud" + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version-file: go.mod + - name: Set up QEMU uses: docker/setup-qemu-action@v2 with: @@ -37,10 +41,6 @@ jobs: username: nickzelei password: ${{ secrets.REPO_PAT }} - - name: Granting private modules access - run: | - git config --global url."https://${{ secrets.REPO_PAT }}:x-oauth-basic@github.com/nucleuscloud".insteadOf "https://github.com/nucleuscloud" - - name: Fetch all tags run: git fetch --force --tags diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cf19d21..722ccf2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,20 +9,25 @@ jobs: name: run-tests strategy: matrix: - go-version: [1.20.x] - platform: [ubuntu-latest, macos-latest] + platform: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.platform }} steps: - - name: Install Go - uses: actions/setup-go@v3 - with: - go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v3 + - name: Granting private modules access run: | git config --global url."https://${{ secrets.REPO_PAT }}:x-oauth-basic@github.com/nucleuscloud".insteadOf "https://github.com/nucleuscloud" + + - name: Install Go + uses: actions/setup-go@v4 + with: + go-version-file: go.mod + + - name: Vet + run: | + go vet ./... + - name: Test run: | - go version go test -v ./...