bunker/.gitea/workflows/on-push.yml
Stanislav N. aka pztrn 900f16cb95
Some checks failed
Linting and tests / Linting (push) Failing after 3s
MOAAAAR!
2025-09-11 08:39:34 +05:00

51 lines
1.4 KiB
YAML

---
name: "Linting and tests"
run-name: "Linting and tests"
on:
- push
jobs:
Linting:
runs-on: "ubuntu-22.04"
container:
image: code.pztrn.name/containers/go-toolbox:v8
steps:
- name: "checkout source"
uses: actions/checkout@v4
- uses: https://gitea.com/actions/go-hashfiles@v0.0.1
id: hash-go
with:
patterns: |
go.mod
go.sum
- name: "cache with go things"
uses: actions/cache@v4
with:
path: /home/container
key: bunker-go-cache-${{ steps.hash-go.outputs.hash }}
restore-keys: bunker-go-cache-${{ steps.hash-go.outputs.hash }}
- name: "lint"
uses: docker://code.pztrn.name/containers/go-toolbox:v8
with:
command: "/usr/local/bin/task lint"
# Tests:
# runs-on: "ubuntu-22.04"
# env:
# GOCACHE: /home/container/go/buildcache
# GOMODCACHE: /home/container/go/pkg
# steps:
# - name: "checkout source"
# uses: actions/checkout@v4
# - name: "cache go dependencies"
# uses: actions/cache@v4
# with:
# path: |
# /home/container/go
# /home/container/golangci-lint
# key: bunker-go-cache
# - name: "tests"
# uses: docker://code.pztrn.name/containers/go-toolbox:v8
# with:
# command: "/usr/local/bin/task test"