aides-repo-api/.forgejo/workflows/format-lint-test.yaml
Maxim Slipenko c872543cdf
Some checks failed
Format and Lint / format-check (pull_request) Successful in 2m44s
Format and Lint / test (pull_request) Failing after 13s
ci: try fix test
2024-12-31 21:21:19 +03:00

67 lines
1.4 KiB
YAML

name: Format and Lint
on:
push:
branches:
- "main"
pull_request:
types: [opened, synchronize, reopened]
jobs:
format-check:
runs-on: docker
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23.3'
- name: Setup cache
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-golang-
- name: Run Format Check
run: |
make format
test:
runs-on: docker
container:
image: registry.altlinux.org/sisyphus/alt:20241211
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23.3'
- name: Setup cache
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-golang-
- name: Prepare for tests
run: |
apt-get install apt-repo-tools
- name: Run Tests
run: |
make test-coverage