mirror of
https://github.com/oxynote/oxynote.git
synced 2026-10-19 20:04:40 +02:00
76 lines
1.9 KiB
YAML
76 lines
1.9 KiB
YAML
name: QA
|
|
on:
|
|
# the release workflow runs every gate on a tag and publishes only
|
|
# once they all pass, so each one has to be callable.
|
|
workflow_call:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- server/core/**
|
|
- .github/workflows/qa-server-core.yml
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- server/core/**
|
|
- .github/workflows/qa-server-core.yml
|
|
|
|
# a newer push supersedes the still-running workflow of the stale commit
|
|
# and cancels it. The group carries a hardcoded per-file prefix because
|
|
# every QA workflow shares the display name "QA", so github.workflow
|
|
# would put them all in one group and let a run of one workflow cancel
|
|
# an in-flight run of another.
|
|
concurrency:
|
|
group: qa-server-core-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
lint:
|
|
name: Linting server/core
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out the code
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v7
|
|
with:
|
|
go-version-file: server/core/go.mod
|
|
cache-dependency-path: server/core/go.sum
|
|
|
|
- name: Installing dependencies
|
|
run: go mod download
|
|
working-directory: server/core
|
|
|
|
- name: Run golangci-lint
|
|
uses: golangci/golangci-lint-action@v9
|
|
with:
|
|
version: v2.14
|
|
working-directory: server/core
|
|
|
|
test:
|
|
name: Unit testing server/core
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out the code
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v7
|
|
with:
|
|
go-version-file: server/core/go.mod
|
|
cache-dependency-path: server/core/go.sum
|
|
|
|
- name: Installing dependencies
|
|
run: go mod download
|
|
working-directory: server/core
|
|
|
|
- name: Run unit tests
|
|
run: make check-coverage
|
|
working-directory: server/core
|