Skip to content

Upgrade to Go 1.21 (#13) #72

Upgrade to Go 1.21 (#13)

Upgrade to Go 1.21 (#13) #72

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.57.2
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: Build
run: go build -v ./...
- name: Package
uses: docker/build-push-action@v2
with:
push: false
tags: erichripko/simple-frontend
context: .
- name: Install test runner
run: curl -sSL "https://github.com/gotestyourself/gotestsum/releases/download/v1.6.2/gotestsum_1.6.2_linux_amd64.tar.gz" | sudo tar -xz -C /usr/local/bin gotestsum
- name: Test
run: gotestsum --junitfile unit-tests.xml -- -v -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload results
uses: EnricoMi/publish-unit-test-result-action@v1
with:
files: unit-tests.xml
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Login to DockerHub
if: ${{ github.ref == 'refs/heads/main' && success() }}
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Release
if: ${{ github.ref == 'refs/heads/main' && success() }}
uses: docker/build-push-action@v2
with:
push: true
tags: erichripko/simple-frontend
context: .