Skip to content

Commit

Permalink
chore: add mac to github workflows (#14)
Browse files Browse the repository at this point in the history
Signed-off-by: Jericho Tolentino <[email protected]>
  • Loading branch information
jericht authored Sep 21, 2023
1 parent 174ea42 commit 2b89ad7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/reuse_python_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ on:

jobs:
Python:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
permissions:
id-token: write
contents: read
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
os: [ubuntu-latest, macOS-latest]
env:
PYTHON: ${{ matrix.python-version }}
CODEARTIFACT_REGION: "us-west-2"
Expand All @@ -25,7 +26,7 @@ jobs:
steps:
- uses: actions/checkout@v4
if: ${{ !inputs.branch }}

- uses: actions/checkout@v4
if: ${{ inputs.branch }}
with:
Expand All @@ -36,7 +37,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand All @@ -45,6 +46,7 @@ jobs:
mask-aws-account-id: true

- name: Install Hatch
shell: bash
run: |
CODEARTIFACT_AUTH_TOKEN=$(aws codeartifact get-authorization-token --domain ${{ secrets.CODEARTIFACT_DOMAIN }} --domain-owner ${{ secrets.CODEARTIFACT_ACCOUNT_ID }} --query authorizationToken --output text --region us-west-2)
echo "::add-mask::$CODEARTIFACT_AUTH_TOKEN"
Expand All @@ -58,4 +60,4 @@ jobs:
run: hatch build

- name: Run Tests
run: hatch run test
run: hatch run test
4 changes: 2 additions & 2 deletions hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ pre-install-commands = [

[envs.default.scripts]
sync = "pip install -r requirements-testing.txt"
test = "pytest {args:test/unit} --numprocesses=auto"
test = "pytest {args:test/unit --numprocesses=auto}"
# Don't pass --numprocesses here so that tests run sequentially.
# pytest-xdist does not allow live output of stdout, meaning integ tests only show output after the test is done
# See: https://pytest-xdist.readthedocs.io/en/stable/known-limitations.html#output-stdout-and-stderr-from-workers
integ-test = "pytest test/integ"
integ-test = "pytest test/integ {args}"
typing = "mypy {args:src test}"
style = [
"ruff {args:.}",
Expand Down

0 comments on commit 2b89ad7

Please sign in to comment.