-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (51 loc) · 1.56 KB
/
tests.yaml
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
---
name: Test
on: [push, pull_request]
jobs:
all-python-tests:
runs-on: ubuntu-latest
if: |
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name !=
github.event.pull_request.base.repo.full_name
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@main
- uses: actions/setup-python@main
with:
python-version: ${{ matrix.python-version }}
- name: Initialize Pants
uses: pantsbuild/actions/init-pants@main
with:
gha-cache-key: v0-py${{ matrix.python-version }}
named-caches-hash: ${{ hashFiles('3rdparty/python/default.lock') }}
- name: Check BUILD files
run: |
pants tailor --check update-build-files --check ::
- name: Typecheck and test
run: |
pants check test ::
latest-python-tests:
runs-on: ubuntu-latest
if: |
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name !=
github.event.pull_request.base.repo.full_name
steps:
- uses: actions/checkout@main
- uses: actions/setup-python@main
with:
python-version: '3.12'
- name: Initialize Pants
uses: pantsbuild/actions/init-pants@main
with:
gha-cache-key: v0-py3.12
named-caches-hash: ${{ hashFiles('3rdparty/python/default.lock') }}
- name: Check BUILD files
run: |
pants tailor --check update-build-files --check ::
- name: Lint and attempt packaging
run: |
pants lint package ::