Skip to content

gha:(deps): bump actions/setup-go from 5.0.2 to 5.1.0 #782

gha:(deps): bump actions/setup-go from 5.0.2 to 5.1.0

gha:(deps): bump actions/setup-go from 5.0.2 to 5.1.0 #782

Workflow file for this run

name: Go
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, labeled, reopened]
# permissions:
# # Required: allow read access to the content for analysis.
# contents: read
# # Optional: allow read access to pull request. Use with `only-new-issues` option.
# # pull-requests: read
# # Optional: Allow write access to checks to allow the action to annotate code in the PR.
# checks: write
jobs:
linters:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '^1.22' ]
name: Go ${{ matrix.go }} linters
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 1
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: ${{ matrix.go }}
check-latest: false
cache: false
id: go
- name: golangci-lint
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1
with:
version: v1.57
# Optional: golangci-lint command line arguments.
#
# Note: By default, the `.golangci.yml` file should be at the root of the repository.
# The location of the configuration file can be changed by using `--config=`
# args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0
# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
# skip-cache: true
tests:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '^1.22' ]
name: Go ${{ matrix.go }} tests
# needs: [linters]
env:
CA_CERT: ${{ secrets.CA_CERT }}
CA_KEY: ${{ secrets.CA_KEY }}
INVALID_CERT: ${{ secrets.INVALID_CERT }}
INVALID_CERT_KEY: ${{ secrets.INVALID_CERT_KEY }}
SERVER_CERT: ${{ secrets.SERVER_CERT }}
SERVER_CERT_KEY: ${{ secrets.SERVER_CERT_KEY }}
SERVER_REQ_PEM: ${{ secrets.SERVER_REQ_PEM }}
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 1
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: ${{ matrix.go }}
check-latest: false
cache: false
id: go
- name: Get dependencies
run: go get -v -t -d ./...
- name: generate certs for tests
run: |
mkdir -p testdata
echo "$CA_CERT" > testdata/ca-cert.pem
echo "$CA_KEY" > testdata/ca-key.pem
echo "$INVALID_CERT" > testdata/invalid-cert.pem
echo "$INVALID_CERT_KEY" > testdata/invalid-cert.key
echo "$SERVER_CERT" > testdata/server-cert.pem
echo "$SERVER_CERT_KEY" > testdata/server-key.key
echo "$SERVER_REQ_PEM" > testdata/server-req.pem
- name: Test
run: go test -v -coverprofile=coverage.out ./...