aides-repo-api/.forgejo/workflows/format-lint-test.yaml
Maxim Slipenko c05a4c320b
All checks were successful
Format and Lint / format-check (push) Successful in 2m46s
Format and Lint / test (push) Successful in 54s
ci: fix test job (#9)
Reviewed-on: https://code.alt-gnome.ru/aides-infra/aides-repo-api/pulls/9
Co-authored-by: Maxim Slipenko <no-reply@maxim.slipenko.com>
Co-committed-by: Maxim Slipenko <no-reply@maxim.slipenko.com>
2025-01-01 00:20:40 +00: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: ghcr.io/aides-infra/aides-repo-api-test-image:20241231
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