Skip to content

add github provider #54

add github provider

add github provider #54

name: Build and test cipr cli tool
on:
pull_request:
branches: ["main"]
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Build app
run: go build -v ./...
- name: Run Tests
run: go test -v -coverprofile=coverage.out ./...
- name: Coverage summary
if: matrix.os == 'ubuntu-latest'
run: |
{
echo '## Coverage'
echo '```'
go tool cover -func=coverage.out
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.12.1