Skip to content

Upgrade Go version to 1.21.2 #69

Upgrade Go version to 1.21.2

Upgrade Go version to 1.21.2 #69

Workflow file for this run

on:
push:
branches:
- master
env:
GO_VERSION: '^1.21.2'
jobs:
test:
runs-on: ubuntu-latest
steps:
-
name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
-
name: Prepare coverage
run: |
go install github.com/jandelgado/gcov2lcov@latest
-
name: Checkout
uses: actions/checkout@v2
-
name: Prepare coverage report
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_TOKEN }}
CC_TR_URL: "https://codeclimate.com/downloads/test-reporter"
CC_TR_BIN: "test-reporter-latest-linux-amd64"
run: |
mkdir -p coverage && \
curl -L ${CC_TR_URL}/${CC_TR_BIN} > ./cc-test-reporter && \
chmod +x ./cc-test-reporter && \
./cc-test-reporter before-build
-
name: Run tests
run: |
go test -v ./... -race -coverprofile=coverage/gcov.out -covermode=atomic && \
gcov2lcov -infile=coverage/gcov.out -outfile=coverage/lcov.info
-
name: Push coverage
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_TOKEN }}
run: |
./cc-test-reporter after-build -t lcov
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: natx
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: natx/synthetic:latest