Configure application security policy in CI #14
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: CLI build and test | |
on: pull_request | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: "^1.17" | |
- name: Set up environment | |
run: echo "GOVERSION=$(go version)" >> $GITHUB_ENV | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v2 | |
with: | |
version: latest | |
args: build --snapshot --rm-dist | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: lagoon-linter | |
path: dist/* | |
cli_test: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Download lagoon-linter binaries | |
uses: actions/download-artifact@v2 | |
with: | |
name: lagoon-linter | |
path: ./dist | |
- name: Run CLI test | |
run: ./cli-test.sh |