Skip to content

Commit

Permalink
build: replace on pull request paths with technote-space/get-diff-act…
Browse files Browse the repository at this point in the history
…ion@v6
  • Loading branch information
lklimek committed Dec 9, 2024
1 parent 9af716e commit 2e958fc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ name: e2e
on:
workflow_dispatch: # allow running workflow manually
pull_request:
paths:
- "**Dockerfile"
- "**.go"
- "go.sum"
push:
branches:
- master
Expand Down Expand Up @@ -40,7 +36,9 @@ jobs:
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/Dockerfile
**/**.go
FILES: |
go.mod
go.sum
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ name: Golang Linter

on:
pull_request:
paths:
- "**.go"
- ".golangci.yml"
- ".github/linters/*"
push:
branches:
- master
Expand All @@ -30,25 +26,32 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/[email protected]
with:
go-version: "^1.23.2"

- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/**.go
.github/linters/*
FILES: |
go.mod
go.sum
.golangci.yml
- uses: actions/[email protected]
if: env.GIT_DIFF
with:
go-version: "^1.23.2"

- name: Install dependencies
if: env.GIT_DIFF
run: sudo apt-get update && sudo apt-get install -y libpcap-dev

- uses: ./.github/actions/bls
if: env.GIT_DIFF
name: Install BLS library
if: "env.GIT_DIFF != ''"

- uses: golangci/[email protected]
if: env.GIT_DIFF
with:
# Required: the version of golangci-lint is required and
# must be specified without patch version: we always use the
Expand All @@ -57,4 +60,3 @@ jobs:
args: --timeout 10m
github-token: ${{ secrets.github_token }}
only-new-issues: true
if: env.GIT_DIFF
13 changes: 8 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
name: Test
on:
pull_request:
paths:
- "**.go"
- "go.sum"
push:
branches:
- master
Expand All @@ -26,20 +23,26 @@ jobs:
PATTERNS: |
**/**.go
"!test/"
FILES: |
go.mod
go.sum
Makefile
- name: Install libpcap
if: env.GIT_DIFF
run: sudo apt-get install --yes libpcap-dev
- uses: ./.github/actions/bls
name: Install BLS library
if: "env.GIT_DIFF != ''"
if: env.GIT_DIFF

- name: Install dependencies
if: env.GIT_DIFF
run: sudo apt-get update && sudo apt-get install -y libpcap-dev

- name: Run Go Tests
if: env.GIT_DIFF
env:
CGO_LDFLAGS: "-L/usr/local/lib -ldashbls -lrelic_s -lmimalloc-secure -lgmp"
CGO_CXXFLAGS: "-I/usr/local/include"
run: |
make test-group-${{ matrix.part }} NUM_SPLIT=6
if: env.GIT_DIFF

0 comments on commit 2e958fc

Please sign in to comment.