remove sensitive info and update readme.md #4
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: Golang CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
jobs: | |
golangci-lint: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
version: v1.54 | |
# Optional: show only new issues if it's a pull request. The default value is `false`. | |
only-new-issues: true | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
go_version: [1.22] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go ${{ matrix.go_version }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go_version }} | |
- name: go tests | |
run: | | |
echo "getting dependencies...". | |
go get -v -u ./... | |
echo "go test for ${{ matrix.os }} and version ${{ matrix.go_version }}". | |
go test -v ./... -cover -race | |
go build -v -o ${{ github.workspace }}/dist/plex_exporter main.go | |
- name: upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: adguardhome_exporter-${{ matrix.os }} | |
path: ${{ github.workspace }}/dist/**/* | |
retention-days: 10 |