-
Notifications
You must be signed in to change notification settings - Fork 82
81 lines (69 loc) · 2.47 KB
/
pants.yaml
File metadata and controls
81 lines (69 loc) · 2.47 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Copyright 2020 Pants project contributors.
# Licensed under the Apache License, Version 2.0 (see LICENSE).
# See https://www.pantsbuild.org/stable/docs/using-pants/using-pants-in-ci for tips on how to set up your CI with Pants.
name: Pants
on: [push, workflow_dispatch]
jobs:
build:
name: Perform CI Checks
strategy:
matrix:
runner:
# Replace with your profile label https://namespace.so/docs/features/faster-github-actions#using-runner-profiles
- namespace-profile-amd64-with-caching
- namespace-profile-arm64-with-caching
python-version: [3.9]
setup:
- manual
- init-pants-action
fail-fast: false
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- name: Set up remote cache
run: |
nsc pants cache setup --pants-toml=pants.cache.toml
- name: Set up local cache
uses: namespacelabs/nscloud-cache-action@v1
with:
path: |
~/.cache/pants/named_caches
~/.cache/pants/lmdb_store
~/.cache/nce
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Limit LMDB memory usage
if: runner.arch == 'ARM64'
run: echo "PANTS_LOCAL_STORE_PROCESSES_MAX_SIZE_BYTES=536870912" >> $GITHUB_ENV
- uses: pantsbuild/actions/init-pants@v8
if: matrix.setup == 'init-pants-action'
with:
gha-cache-key: v0
named-caches-hash: ${{ hashFiles('python-default.lock') }}
pants-ci-config: "['pants.toml', 'pants.ci.toml', 'pants.cache.toml']"
- name: Install Pants manually
if: matrix.setup == 'manual'
run: |
curl --proto '=https' --tlsv1.2 -fsSL https://static.pantsbuild.org/setup/get-pants.sh | bash
echo "PANTS_CONFIG_FILES=['pants.toml','pants.ci.toml','pants.cache.toml']" >> $GITHUB_ENV
- name: Check BUILD files
run: |
pants tailor --check update-build-files --check ::
- name: Lint and typecheck
run: |
pants lint check ::
- name: Test
run: |
pants test ::
- name: Package / Run
run: |
# We also smoke test that our release process will work by running `package`.
pants package ::
pants run helloworld/:pex_binary
- name: Breakpoint
uses: namespacelabs/breakpoint-action@v0
if: failure()
with:
duration: 15m
authorized-users: edganiukov,hugosantos,n-g,htr,nichtverstehen,gmichelo