Skip to content

Commit

Permalink
Add GitHub test with go 1.18
Browse files Browse the repository at this point in the history
Added to ensure that go 1.18 works until its support is dropped.
  • Loading branch information
Danielius1922 authored and Daniel Adam committed Sep 5, 2023
1 parent 509bae0 commit 20e7310
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,29 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

test1_18:
# don't run for forks
if: github.event_name == 'push' ||
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
github.event_name == 'workflow_dispatch'

runs-on: ubuntu-latest

steps:
- name: Set up Go 1.18
uses: actions/setup-go@v4
with:
# Go 1.18 is required by coap-gateway-go1-18 in https://github.com/plgd-dev/hub/blob/main/.github/workflows/publishDockerImagesGhcr.yml
go-version: "~1.18"

- run: go version

- name: Checkout
uses: actions/checkout@v4

- name: Run a build
run: go build ./...

- name: Run a test
run: go test -v -race ./... -coverpkg=./... -covermode=atomic -coverprofile=./coverage.txt

0 comments on commit 20e7310

Please sign in to comment.