mirror of
https://github.com/bakito/adguardhome-sync.git
synced 2025-10-26 11:19:54 +00:00
73 lines
1.4 KiB
YAML
73 lines
1.4 KiB
YAML
name: Go
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
golangci:
|
|
name: lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version-file: "go.mod"
|
|
|
|
- name: Lint
|
|
run: make lint
|
|
|
|
test:
|
|
name: test
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
steps:
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version-file: "go.mod"
|
|
|
|
- name: Model
|
|
run: make model
|
|
|
|
- name: Test
|
|
run: make test-ci
|
|
|
|
- name: Send coverage
|
|
if: runner.os == 'Linux'
|
|
uses: shogo82148/actions-goveralls@v1
|
|
continue-on-error: true
|
|
with:
|
|
path-to-profile: coverage.out
|
|
|
|
test-release:
|
|
name: test release
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version-file: "go.mod"
|
|
|
|
- name: Run GoReleaser
|
|
run: make test-release
|