diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..9ec2391 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,10 @@ +name: CI +permissions: + contents: read +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] +jobs: + ci: + name: Build, Test, and Lint + uses: nicheinc/actions-go-ci-library/.github/workflows/action.yaml@v2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 27841df..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: CI -on: [pull_request] -permissions: - contents: read -jobs: - go-versions: - name: Check Go Versions - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.versions.outputs.matrix }} - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Set Go Versions - uses: arnested/go-version-action@v1 - id: versions - - test: - runs-on: ubuntu-latest - needs: go-versions - strategy: - fail-fast: false - matrix: - go: ${{ fromJSON(needs.go-versions.outputs.matrix) }} - name: "Build (${{ matrix.go }})" - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go }} - - - name: Build - run: go build ./... - - - name: Test - run: go test -cover -race ./... - - lint: - runs-on: ubuntu-latest - name: "lint" - continue-on-error: true - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: golangci-lint - uses: golangci/golangci-lint-action@v2 - with: - version: latest - args: --disable-all -E govet