Merge pull request #35 from telekom-mms/feature/add-daemon-config #58
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
lint: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: stable | |
- name: Lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: latest | |
# https://github.com/golangci/golangci-lint-action/issues/135 | |
skip-pkg-cache: true | |
testAndBuild: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: stable | |
- name: Run test | |
run: go test -v -coverprofile cover.out ./... | tee test.out | |
shell: bash | |
- name: Process results | |
if: always() | |
uses: malaupa/go-test-coverage-summary-action@v2.0.0 | |
with: | |
test_results: "test.out" | |
coverage_profile: "cover.out" | |
with_archive: true | |
- name: Test Build | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --snapshot --clean | |
- name: Store package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: deb-package | |
path: | | |
dist/*.deb | |
dist/checksums.txt | |
retention-days: 10 | |
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json |