-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (64 loc) · 1.72 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: CI
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
org-check:
name: Check GitHub Organization
if: ${{ github.repository_owner == 'Dicey-Tech' }}
runs-on: ubuntu-20.04
steps:
- name: Noop
run: "true"
build:
name: Perform CI Checks
needs: org-check
env:
PANTS_CONFIG_FILES: pants.ci.toml
runs-on: ubuntu-20.04
strategy:
matrix:
python-version:
- "pypy-3.8"
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: cache
with:
path: |
~/.cache/pants/setup
~/.cache/pants/lmdb_store
~/.cache/pants/named_caches
key: ${{ runner.os }}-
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Bootstrap Pants
run: |
./pants --version
- name: Check BUILD files
run: ./pants tailor --check update-build-files --check
- name: Lint and typecheck
run: |
./pants --changed-since=origin/main lint
# - name: Test
# run: |
# ./pants \
# --changed-since=origin/main \
# --changed-dependees=transitive \
# check test
# - name: Package / Run
# run: |
# # We also smoke test that our release process will work by running `package`.
# ./pants package ::
- name: Upload pants log
uses: actions/upload-artifact@v2
with:
name: pants-log
path: .pants.d/pants.log
if: always() # We want the log even on failures.