Skip to content

[generator] Improve code quality #59

[generator] Improve code quality

[generator] Improve code quality #59

Workflow file for this run

on:
push:
branches:
- main
name: Testing
env:
GO111MODULE: on
permissions:
contents: read
jobs:
test:
name: "${{ matrix.platform }} - ${{ matrix.go-version }}"
permissions:
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
contents: read # for actions/checkout to fetch code
strategy:
# currently only test on linux and latest go version, due to using live servers
matrix:
go-version: [1.21.x]
platform: [ubuntu-latest]
include:
# only update test coverage stats with the most recent go version on linux
- go-version: 1.21.x
platform: ubuntu-latest
update-coverage: true
runs-on: ${{ matrix.platform }}
steps:
- name: Cancel previous workflow
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
- name: Test
env:
WARGAMING_API_ID: ${{ secrets.WARGAMING_API_ID }}
run: go test -v -race -coverprofile coverage.txt -covermode atomic ./...
- name: Upload coverage to Codecov
if: ${{ matrix.update-coverage }}
uses: codecov/codecov-action@v3.1.0