Skip to content

chore: added flake into the project #26

chore: added flake into the project

chore: added flake into the project #26

Workflow file for this run

name: Test
on:
pull_request:
env:
GOPRIVATE: github.com/Drafteame
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }} - Test'
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
checks: write
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
- name: Config private packages
run: git config --global url.https://${{ secrets.ACCESS_TOKEN }}@github.com/Drafteame.insteadOf https://github.com/Drafteame
- name: Install dependencies
run: |
go mod download
go install gotest.tools/gotestsum@latest
- name: Test
run: |
gotestsum --format pkgname-and-test-fails --raw-command -- go test -v -race -json -coverprofile=coverage.out ./...
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
- name: Config private packages
run: git config --global url.https://${{ secrets.ACCESS_TOKEN }}@github.com/Drafteame.insteadOf https://github.com/Drafteame
- name: Install dependencies
run: go mod download
- name: Go vet
run: go vet ./...
- name: Golangci-lint
uses: golangci/[email protected]
with:
version: latest
github-token: ${{ secrets.ACCESS_TOKEN }}
only-new-issues: true
commit_lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: '${{ secrets.ACCESS_TOKEN }}'
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install Commitizen
run: pip install -U commitizen
- name: Check commits
run: cz check --rev-range origin/main..HEAD