Skip to content

Commit

Permalink
ci: manually install pants (#17079)
Browse files Browse the repository at this point in the history
  • Loading branch information
masci authored Nov 26, 2024
1 parent cbf958f commit 3178370
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,29 @@ jobs:
CI: true
shell: bash
run: rm -rf /opt/hostedtoolcache/*

- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: update rustc
run: rustup update stable

- name: Install Poetry
run: pipx install poetry==${{ env.POETRY_VERSION }}

- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: pantsbuild/actions/init-pants@v5-scie-pants
with:
# v0 makes it easy to bust the cache if needed
# just increase the integer to start with a fresh cache
gha-cache-key: v1-py${{ matrix.python_version }}
named-caches-hash: v1-py${{ matrix.python_version }}
pants-python-version: ${{ matrix.python-version }}
pants-ci-config: pants.toml

- name: Install pants
run: |
curl --proto '=https' --tlsv1.2 -fsSLO https://static.pantsbuild.org/setup/get-pants.sh
chmod +x get-pants.sh
./get-pants.sh
- name: Check BUILD files
run: |
pants tailor --check :: -docs/::
- name: Run coverage checks on changed packages
run: |
# Get the changed files
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,29 @@ jobs:
CI: true
shell: bash
run: rm -rf /opt/hostedtoolcache/*

- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: update rustc
run: rustup update stable

- name: Install Poetry
run: pipx install poetry==${{ env.POETRY_VERSION }}

- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: pantsbuild/actions/init-pants@v5-scie-pants
with:
# v0 makes it easy to bust the cache if needed
# just increase the integer to start with a fresh cache
named-caches-hash: v3-py${{ matrix.python_version }}-${{ hashFiles('./**/pyproject.toml') }}
pants-ci-config: pants.toml

- name: Install pants
run: |
curl --proto '=https' --tlsv1.2 -fsSLO https://static.pantsbuild.org/setup/get-pants.sh
chmod +x get-pants.sh
./get-pants.sh
- name: Check BUILD files
run: |
pants tailor --check :: -docs/::
- name: Run testing
env:
CI: true
Expand Down

0 comments on commit 3178370

Please sign in to comment.