Skip to content

Commit

Permalink
update build action
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkahan committed Feb 1, 2024
1 parent 2297a24 commit edf87d4
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Build
on: push
on: [push, pull_request]

permissions:
actions: write
Expand All @@ -21,17 +21,28 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: ["ubuntu-latest", "macos-latest"]
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: ["ubuntu-latest"]
steps:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Clone repo
uses: actions/checkout@v3
- name: Install dependencies
run: make install
- name: setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Initialize Pants
uses: pantsbuild/actions/init-pants@main
with:
gha-cache-key: cache0-py${{ matrix.python_version }}
named-caches-hash: ${{ hashFiles('requirements.txt') }}
- name: Check BUILD files
run: |
pants tailor --check update-build-files --check ::
- name: Format
run: |
pants fmt ::
- name: Run tests
run: make coverage
run: |
pants test --use-coverage ::
- name: Run codecov
uses: codecov/codecov-action@v3

0 comments on commit edf87d4

Please sign in to comment.