-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (36 loc) · 1.05 KB
/
Copy pathmain.yaml
File metadata and controls
44 lines (36 loc) · 1.05 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
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11']
steps:
- uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Initialize Pants
uses: pantsbuild/actions/init-pants@main
with:
# cache0 makes it easy to bust the cache if needed
gha-cache-key: cache0-py${{ matrix.python-version }}
named-caches-hash: ${{ hashFiles('3rdparty/python/*.lock') }}
cache-lmdb-store: 'true'
- name: Lint
run: |
./pants tailor --check update-build-files --check 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 ::
./dist/src.python.hello_world.cli/hello_world.pex