Skip to content

Commit 173c1d8

Browse files
authored
Merge pull request #533 from tweag/circleci-run-linters-first
CircleCI: run linters at the beginning of CI
2 parents c58bdc8 + acb6442 commit 173c1d8

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.circleci/config.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
version: 2
22

33
jobs:
4+
5+
# ATTN: when you change anything here, don’t forget to copy it to the build-darwin section
46
build-linux:
57
docker:
68
- image: nixos/nix:2.1.3
@@ -14,18 +16,22 @@ jobs:
1416
apk --no-progress update
1517
apk --no-progress add bash ca-certificates
1618
nix-channel --update
19+
- run:
20+
name: Bazel linter
21+
command: |
22+
nix-shell --pure --run 'bazel run //:buildifier'
1723
- run:
1824
name: Build
1925
command: |
20-
nix-shell --pure --run "bazel build --jobs=2 //... @haskell_zlib//... --config=ci"
21-
nix-shell --pure --run "bazel build -c dbg --jobs=2 //... --config=ci"
26+
nix-shell --pure --run 'bazel build --jobs=2 //... @haskell_zlib//... --config=ci'
27+
nix-shell --pure --run 'bazel build -c dbg --jobs=2 //... --config=ci'
2228
- run:
2329
name: Run tests
2430
# bazel does not support recursive bazel call, so we
2531
# cannot use bazel run here because the test runner uses
2632
# bazel
2733
command: |
28-
nix-shell --pure --run "bazel build //tests:run-tests && ./bazel-bin/tests/run-tests"
34+
nix-shell --pure --run 'bazel build //tests:run-tests && ./bazel-bin/tests/run-tests'
2935
3036
build-darwin:
3137
macos:
@@ -37,6 +43,10 @@ jobs:
3743
command: |
3844
curl https://nixos.org/nix/install | sh
3945
- run:
46+
name: Bazel linter
47+
shell: /bin/bash -eilo pipefail
48+
command: |
49+
nix-shell --run 'bazel run //:buildifier'
4050
name: Run tests
4151
shell: /bin/bash -eilo pipefail
4252
# bazel does not support recursive bazel call, so we

0 commit comments

Comments
 (0)