Skip to content

Commit

Permalink
fix: CI workflow for macos (#342)
Browse files Browse the repository at this point in the history
* fix: CI workflow for macos

Signed-off-by: Frost Ming <me@frostming.com>

* fix: python version

Signed-off-by: Frost Ming <me@frostming.com>

* fix: use default python and remove linting job

Signed-off-by: Frost Ming <me@frostming.com>

* fix

Signed-off-by: Frost Ming <me@frostming.com>

* fix: update yaml

Signed-off-by: Frost Ming <me@frostming.com>
  • Loading branch information
frostming authored Apr 30, 2024
1 parent 3711b06 commit 6351f3d
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 90 deletions.
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.

0 comments on commit 6351f3d

Please sign in to comment.