Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: CI workflow for macos #342

Merged
merged 5 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 7 additions & 14 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,33 +34,26 @@ jobs:
shell: bash
steps:
- name: Checkout Source (${{ matrix.project }})
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: python-poetry/${{ matrix.project }}

- name: Checkout Source (tomlkit)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: tomlkit

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Bootstrap poetry
run: |
curl -sL https://install.python-poetry.org | python - -y ${{ matrix.bootstrap-args }}

- name: Update PATH
if: ${{ matrix.os != 'Windows' }}
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Update Path for Windows
if: ${{ matrix.os == 'Windows' }}
run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH
run: pipx install poetry

- name: Configure poetry
run: poetry config virtualenvs.in-project true
run: |
poetry config virtualenvs.in-project true
poetry env use python

- name: Get full Python version
if: matrix.project != 'poetry-core'
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,13 @@ jobs:
id: tag
run: echo ::set-output name=tag::${GITHUB_REF#refs/tags/}

- name: Set up Python 3.11
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: 3.x

- name: Install and set up Poetry
run: |
curl -fsSL -o install-poetry.py https://install.python-poetry.org
python install-poetry.py -y

- name: Update PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
run: pipx install poetry

- name: Build project for distribution
run: poetry build
Expand Down
34 changes: 7 additions & 27 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,22 @@ on:
- "**"

jobs:
Linting:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: pre-commit/action@v2.0.3

Tests:
needs: Linting
name: ${{ matrix.os }} / ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [Ubuntu, MacOS, Windows]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
os: [ubuntu-latest, macos-13, windows-latest]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", 3.12]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: "recursive"

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -47,22 +36,13 @@ jobs:
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")

- name: Install Poetry
shell: bash
run: curl -fsSL https://install.python-poetry.org | python - -y --version 1.4.0

- name: Update PATH
if: ${{ matrix.os != 'Windows' }}
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Update Path for Windows
if: ${{ matrix.os == 'Windows' }}
shell: bash
run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH
run: pipx install poetry

- name: Configure Poetry
shell: bash
run: |
poetry config virtualenvs.in-project true
poetry env use python

- name: Set up cache
uses: actions/cache@v3
Expand Down
93 changes: 52 additions & 41 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading