updatecli: avoid sending a slack message #35
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
--- | |
## Workflow to lint and test | |
name: pull-request | |
permissions: | |
contents: read | |
on: | |
pull_request: | |
push: | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
env: | |
JENKINS_URL: https://beats-ci.elastic.co/ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Fetch Go version from .go-version | |
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV | |
- uses: actions/setup-python@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Install dependencies | |
run: | | |
go install github.com/golangci/golangci-lint/cmd/[email protected] | |
go install golang.org/x/lint/golint | |
- uses: pre-commit/[email protected] | |
test: | |
name: Run Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Fetch Go version from .go-version | |
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
cache: true | |
cache-dependency-path: go.sum | |
- name: build | |
run: .ci/scripts/build-test.sh | |
- uses: actions/upload-artifact@v3 # upload test results | |
if: success() || failure() # run this step even if previous step failed | |
with: | |
name: test-results | |
path: outputs/TEST-unit-*.xml |