2024-10-12 18:43:48 +01:00
|
|
|
---
|
2024-10-13 15:36:54 +01:00
|
|
|
name: CI
|
2024-10-12 18:43:48 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
2024-10-13 15:36:54 +01:00
|
|
|
branches:
|
|
|
|
- main
|
2024-10-12 18:43:48 +01:00
|
|
|
types:
|
|
|
|
- opened
|
|
|
|
- synchronize
|
|
|
|
|
|
|
|
jobs:
|
2024-10-13 15:36:54 +01:00
|
|
|
tests:
|
|
|
|
name: Tests
|
2024-10-12 18:43:48 +01:00
|
|
|
if: ${{ ! github.event.pull_request.draft }}
|
|
|
|
runs-on: docker
|
|
|
|
steps:
|
|
|
|
- name: Checkout Repository
|
|
|
|
uses: https://code.forgejo.org/actions/checkout@v4
|
2024-10-13 15:36:54 +01:00
|
|
|
- name: Run tests
|
2024-10-12 18:43:48 +01:00
|
|
|
uses: https://codeflow.dananglin.me.uk/actions/mage-ci@main
|
|
|
|
with:
|
|
|
|
target: test
|
|
|
|
env:
|
|
|
|
PROJECT_TEST_VERBOSE: "1"
|
|
|
|
PROJECT_TEST_COVER: "1"
|
2024-10-13 15:36:54 +01:00
|
|
|
- name: Run gosec
|
|
|
|
uses: https://codeflow.dananglin.me.uk/actions/mage-ci@main
|
|
|
|
with:
|
|
|
|
target: gosec
|
2024-10-15 18:22:55 +01:00
|
|
|
- name: Run go vet
|
|
|
|
uses: https://codeflow.dananglin.me.uk/actions/mage-ci@main
|
|
|
|
with:
|
|
|
|
target: govet
|
2024-10-13 15:36:54 +01:00
|
|
|
|
|
|
|
style:
|
|
|
|
name: Style
|
|
|
|
if: ${{ ! github.event.pull_request.draft }}
|
|
|
|
runs-on: docker
|
|
|
|
steps:
|
|
|
|
- name: Checkout Repository
|
|
|
|
uses: https://code.forgejo.org/actions/checkout@v4
|
|
|
|
- name: Check formatting
|
|
|
|
uses: https://codeflow.dananglin.me.uk/actions/mage-ci@main
|
|
|
|
with:
|
|
|
|
target: gofmt
|
|
|
|
env:
|
|
|
|
PROJECT_FAIL_ON_FORMATTING: 1
|
|
|
|
- name: Run staticcheck
|
|
|
|
uses: https://codeflow.dananglin.me.uk/actions/mage-ci@main
|
|
|
|
with:
|
|
|
|
target: staticcheck
|