Skip to content

HW03 complete

HW03 complete #6

Workflow file for this run

name: Otus homework tests
on:
push:
branches:
- hw*
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Extract branch name
run: echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ~1.19
- name: Check out code
uses: actions/checkout@v3
- name: Linters
uses: golangci/golangci-lint-action@v3
with:
version: v1.53.3
working-directory: ${{ env.BRANCH }}
tests:
runs-on: ubuntu-latest
steps:
- name: Extract branch name
run: echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ^1.19
- name: Check out code
uses: actions/checkout@v3
- name: Unit tests
run: go test -v -count=1 -race -timeout=1m ./...
working-directory: ${{ env.BRANCH }}