Skip to content

Commit 61e8694

Browse files
committed
Add github workflow (bootstrapped from example-golang).
1 parent 6187a61 commit 61e8694

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/pants.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Copyright 2021 Pants project contributors.
2+
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3+
4+
# See https://pants.readme.io/docs/using-pants-in-ci for tips on how to set up your CI with Pants.
5+
6+
name: Pants
7+
8+
on: [push, pull_request]
9+
10+
jobs:
11+
org-check:
12+
name: Check GitHub Organization
13+
if: ${{ github.repository_owner == 'pantsbuild' }}
14+
runs-on: ubuntu-20.04
15+
steps:
16+
- name: Noop
17+
run: "true"
18+
build:
19+
name: Perform CI Checks
20+
needs: org-check
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: actions/cache@v2
25+
id: cache
26+
with:
27+
path: |
28+
~/.cache/pants/setup
29+
~/.cache/pants/lmdb_store
30+
~/.cache/pants/named_caches
31+
key: ${{ runner.os }}-
32+
- name: Bootstrap Pants
33+
run: ./pants --version
34+
- name: Check Pants config files
35+
run: ./pants tailor --check update-build-files --check
36+
- name: Lint, compile, and test
37+
run: ./pants lint check test '::'
38+
- name: Package / Run
39+
run: |
40+
./pants package ::
41+
- name: Upload Pants log
42+
uses: actions/upload-artifact@v2
43+
with:
44+
name: pants-log
45+
path: .pants.d/pants.log
46+
if: always() # We want the log even on failures.

0 commit comments

Comments
 (0)