ci: test paths directive (#6251)

* test paths directive

* change proto files

* test paths on code coverage

* have parts of ci only run when go files are touched

* add readme badge

* bring back green checks

* remove paths

* green check linting

* add tests no run
This commit is contained in:
Marko
2020-05-19 13:32:35 +00:00
committed by GitHub
parent e0fa14c0e1
commit d7677e0871
6 changed files with 115 additions and 106 deletions
+12 -1
View File
@@ -1,14 +1,25 @@
name: Lint
on: [pull_request]
on:
pull_request:
push:
branches:
- master
jobs:
golangci:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v1
with:
SUFFIX_FILTER: |
.go
.mod
.sum
- uses: golangci/golangci-lint-action@master
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.26
args: --timeout 10m
github-token: ${{ secrets.github_token }}
if: "env.GIT_DIFF != ''"
+4 -15
View File
@@ -1,29 +1,18 @@
name: Protobuf
on: [pull_request]
on:
pull_request:
paths:
- '**.proto'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: technote-space/get-diff-action@v1
id: git_diff
with:
SUFFIX_FILTER: .proto
SET_ENV_NAME_INSERTIONS: 1
SET_ENV_NAME_LINES: 1
- name: lint
run: make proto-lint-docker
if: "env.GIT_DIFF != ''"
breakage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: technote-space/get-diff-action@v1
id: git_diff
with:
SUFFIX_FILTER: .proto
SET_ENV_NAME_INSERTIONS: 1
SET_ENV_NAME_LINES: 1
- name: check-breakage
run: make proto-check-breaking-docker
if: "env.GIT_DIFF != ''"
+2 -1
View File
@@ -1,5 +1,6 @@
name: Sims
on: [pull_request]
on:
pull_request:
jobs:
cleanup-runs:
runs-on: ubuntu-latest
+9 -1
View File
@@ -29,7 +29,6 @@ jobs:
run: |
make build
if: "env.GIT_DIFF != ''"
- name: test & coverage report creation
run: |
go test ./... -mod=readonly -timeout 12m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock'
@@ -50,10 +49,18 @@ jobs:
file: ./coverage.txt # optional
fail_ci_if_error: true
if: "env.GIT_DIFF != ''"
integration-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v1
id: git_diff
with:
SUFFIX_FILTER: |
.go
.mod
.sum
- name: build-sim
run: |
make build-sim
@@ -61,3 +68,4 @@ jobs:
- name: cli-test
run: |
make test-integration
if: "env.GIT_DIFF != ''"