forked from TrueCloudLab/certificates
[action] update test and release action to use common workflows
This commit is contained in:
parent
ffff9af323
commit
89bccf7796
2 changed files with 10 additions and 72 deletions
38
.github/workflows/release.yml
vendored
38
.github/workflows/release.yml
vendored
|
@ -7,41 +7,13 @@ on:
|
||||||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
ci:
|
||||||
name: Lint, Test, Build
|
uses: smallstep/workflows/.github/workflows/goCI.yml@main
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
go: [ '1.18', '1.19' ]
|
|
||||||
outputs:
|
|
||||||
is_prerelease: ${{ steps.is_prerelease.outputs.IS_PRERELEASE }}
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
-
|
|
||||||
name: Setup Go
|
|
||||||
uses: actions/setup-go@v2
|
|
||||||
with:
|
|
||||||
go-version: ${{ matrix.go }}
|
|
||||||
-
|
|
||||||
name: Install Deps
|
|
||||||
id: install-deps
|
|
||||||
run: sudo apt-get -y install libpcsclite-dev
|
|
||||||
-
|
|
||||||
name: golangci-lint
|
|
||||||
uses: golangci/golangci-lint-action@v2
|
|
||||||
with:
|
|
||||||
version: ${{ secrets.GOLANGCI_LINT_VERSION }}
|
|
||||||
args: --timeout=30m
|
|
||||||
-
|
|
||||||
name: Test, Build
|
|
||||||
id: lint_test_build
|
|
||||||
run: V=1 make ci
|
|
||||||
|
|
||||||
create_release:
|
create_release:
|
||||||
name: Create Release
|
name: Create Release
|
||||||
needs: test
|
needs: ci
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
outputs:
|
outputs:
|
||||||
debversion: ${{ steps.extract-tag.outputs.DEB_VERSION }}
|
debversion: ${{ steps.extract-tag.outputs.DEB_VERSION }}
|
||||||
|
@ -132,7 +104,7 @@ jobs:
|
||||||
build_upload_docker:
|
build_upload_docker:
|
||||||
name: Build & Upload Docker Images
|
name: Build & Upload Docker Images
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: test
|
needs: ci
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
|
|
44
.github/workflows/test.yml
vendored
44
.github/workflows/test.yml
vendored
|
@ -1,4 +1,4 @@
|
||||||
name: Lint, Test, Build
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -7,43 +7,9 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- "**"
|
- "**"
|
||||||
pull_request:
|
pull_request:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lintTestBuild:
|
ci:
|
||||||
name: Lint, Test, Build
|
uses: smallstep/workflows/.github/workflows/goCI.yml@main
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
go: [ '1.18', '1.19' ]
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
-
|
|
||||||
name: Setup Go
|
|
||||||
uses: actions/setup-go@v2
|
|
||||||
with:
|
|
||||||
go-version: ${{ matrix.go }}
|
|
||||||
-
|
|
||||||
name: Install Deps
|
|
||||||
id: install-deps
|
|
||||||
run: sudo apt-get -y install libpcsclite-dev
|
|
||||||
-
|
|
||||||
name: golangci-lint
|
|
||||||
uses: golangci/golangci-lint-action@v2
|
|
||||||
with:
|
|
||||||
version: ${{ secrets.GOLANGCI_LINT_VERSION }}
|
|
||||||
args: --timeout=30m
|
|
||||||
-
|
|
||||||
name: Test, Build
|
|
||||||
id: lint_test_build
|
|
||||||
run: V=1 make ci
|
|
||||||
-
|
|
||||||
name: Codecov
|
|
||||||
if: matrix.go == '1.19'
|
|
||||||
uses: codecov/codecov-action@v2
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
files: ./coverage.out # optional
|
|
||||||
name: codecov-umbrella # optional
|
|
||||||
fail_ci_if_error: true # optional (default = false)
|
|
||||||
|
|
Loading…
Reference in a new issue