Skip to content

revert

revert #37

Workflow file for this run

---
## 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/golangci-lint@v1.50.0
go install golang.org/x/lint/golint
- uses: pre-commit/action@v3.0.0
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