Skip to content

Commit a99b8ce

Browse files
committed
ci
1 parent a58c6aa commit a99b8ce

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Runs the same checks as `make all` (gotools image + test + lint).
2+
name: CI
3+
4+
on:
5+
push:
6+
paths-ignore:
7+
- "doc/**"
8+
pull_request:
9+
paths-ignore:
10+
- "doc/**"
11+
12+
jobs:
13+
all:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: make all (gotools image + test + lint)
19+
env:
20+
CI: true
21+
run: make all

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ MAXIMUM_COMPLEXITY=15
33

44
GO_VER?=latest
55
DOCKER:=$(shell if which podman >/dev/null; then echo podman; else echo docker; fi)
6-
RUN:=$(DOCKER) run -it --rm -w $(CURDIR) -v $(CURDIR):$(CURDIR):Z gotools:$(GO_VER)
6+
7+
ifeq ($(CI),true)
8+
RUN:=$(DOCKER) run --rm -w $(CURDIR) -v $(CURDIR):$(CURDIR) gotools:$(GO_VER)
9+
else
10+
RUN:=$(DOCKER) run --rm -w $(CURDIR) -v $(CURDIR):$(CURDIR):Z gotools:$(GO_VER)
11+
endif
712
COV=/tmp/test.out
813

914
.PHONY: all

0 commit comments

Comments
 (0)