-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (55 loc) · 1.9 KB
/
ci.yaml
File metadata and controls
57 lines (55 loc) · 1.9 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
name: CI
on:
pull_request: {}
push:
branches:
- main
jobs:
lint_test_package:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python 3.11.x
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Initialize Pants launcher
uses: pantsbuild/actions/init-pants@56efcdb79721bc7726edf542e324468033e4e21c
with:
# cache0 makes it easy to bust the cache if needed
gha-cache-key: cache0-py3.11
named-caches-hash: ${{ hashFiles('3rdparty/python/pants-2.29.lock') }}
env:
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY }}
- name: Lint and typecheck the code
run: "pants lint check ::"
env:
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY }}
- name: Run tests
run: "pants test ::"
env:
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY }}
# - name: Package plugin as PEX for various Pants versions.
# run: |
# pants package src/python/shoalsoft/pants_opentelemetry_plugin::
# if [ ! -r dist/shoalsoft_pants_opentelemetry_plugin-*-py3-none-any.whl ]; then
# echo "ERROR: No wheel found in dist." 1>&2
# exit 1
# fi
# for pants_version in 2.27 2.26 2.25; do
# if [ ! -r dist/shoalsoft-pants-opentelemetry-plugin-pants${pants_version}-*.pex ]; then
# echo "ERROR: No PEX file found for Pants version $pants_version." 1>&2
# exit 1
# fi
# done
# env:
# HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY }}
- name: Upload pants.log
if: always()
uses: actions/upload-artifact@v4
continue-on-error: true
with:
name: pants-logs
overwrite: 'true'
path: .pants.d/workdir/*.log