Skip to content

chore(deps): update softprops/action-gh-release action to v2 #109

chore(deps): update softprops/action-gh-release action to v2

chore(deps): update softprops/action-gh-release action to v2 #109

Workflow file for this run

on:
push:
branches: [main]
pull_request:
branches: [main]
name: Build
defaults:
run:
shell: bash
jobs:
lint:
name: Lint files
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3.0.2
- uses: actions/setup-go@v2
with:
go-version: '1.16.x'
- uses: actions/cache@v2
with:
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
%LocalAppData%\go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: golangci-lint
uses: golangci/golangci-lint-action@v3.1.0
with:
version: v1.42.0
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.0.2
with:
fetch-depth: 2
- uses: actions/setup-go@v2
with:
go-version: '1.16.x'
- name: List
run: go list -mod=mod all
- name: Run coverage
run: |
go get -u github.com/ory/go-acc
go mod vendor
$(go env GOPATH)/bin/go-acc --ignore 'examples' ./...
- name: Upload coverage to Codecov
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${{ secrets.CODECOV_TOKEN }}
test:
strategy:
matrix:
go-version: [1.15.x, 1.16.x, 1.17.x]
runs-on: 'ubuntu-latest'
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3.0.2
- uses: actions/cache@v2
with:
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
%LocalAppData%\go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Test
run: go test -v -race