Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
github-actions: bump versions, remove obsoleted tools and remove supp…
Browse files Browse the repository at this point in the history
…ort for Windows linting (#3806)

(cherry picked from commit c674efd)

# Conflicts:
#	.github/workflows/pre-commit.yml
  • Loading branch information
v1v authored and mergify[bot] committed Apr 1, 2024
1 parent 8d3f494 commit ca18046
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 12 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ jobs:
golangci:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
os: [ ubuntu-latest ]
name: lint
runs-on: ${{ matrix.os }}
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
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: pre-commit

on:
push:
branches:
- 'main'
- '8**'
- '7.17'
pull_request:

# limit the access of the generated GITHUB_TOKEN
permissions:
contents: read

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: .go-version
- uses: actions/setup-python@v3
- name: Install dependencies
run: .ci/scripts/install-dependencies.sh
- uses: elastic/apm-pipeline-library/.github/actions/pre-commit@current
8 changes: 3 additions & 5 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ jobs:
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
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
cache: true
cache-dependency-path: go.sum
- name: build
Expand Down
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ repos:
rev: v0.5.0
hooks:
- id: go-fmt
- id: go-lint
- id: no-go-testing
- id: golangci-lint
args: ["--fix", "--fast", "--new"]
Expand Down

0 comments on commit ca18046

Please sign in to comment.