Skip to content

Commit 6351f3d

Browse files
authored
fix: CI workflow for macos (#342)
* fix: CI workflow for macos Signed-off-by: Frost Ming <[email protected]> * fix: python version Signed-off-by: Frost Ming <[email protected]> * fix: use default python and remove linting job Signed-off-by: Frost Ming <[email protected]> * fix Signed-off-by: Frost Ming <[email protected]> * fix: update yaml Signed-off-by: Frost Ming <[email protected]>
1 parent 3711b06 commit 6351f3d

File tree

4 files changed

+69
-90
lines changed

4 files changed

+69
-90
lines changed

.github/workflows/integration.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,33 +34,26 @@ jobs:
3434
shell: bash
3535
steps:
3636
- name: Checkout Source (${{ matrix.project }})
37-
uses: actions/checkout@v3
37+
uses: actions/checkout@v4
3838
with:
3939
repository: python-poetry/${{ matrix.project }}
4040

4141
- name: Checkout Source (tomlkit)
42-
uses: actions/checkout@v3
42+
uses: actions/checkout@v4
4343
with:
4444
path: tomlkit
4545

46-
- uses: actions/setup-python@v2
46+
- uses: actions/setup-python@v5
4747
with:
4848
python-version: ${{ matrix.python-version }}
4949

5050
- name: Bootstrap poetry
51-
run: |
52-
curl -sL https://install.python-poetry.org | python - -y ${{ matrix.bootstrap-args }}
53-
54-
- name: Update PATH
55-
if: ${{ matrix.os != 'Windows' }}
56-
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
57-
58-
- name: Update Path for Windows
59-
if: ${{ matrix.os == 'Windows' }}
60-
run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH
51+
run: pipx install poetry
6152

6253
- name: Configure poetry
63-
run: poetry config virtualenvs.in-project true
54+
run: |
55+
poetry config virtualenvs.in-project true
56+
poetry env use python
6457
6558
- name: Get full Python version
6659
if: matrix.project != 'poetry-core'

.github/workflows/release.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,13 @@ jobs:
1919
id: tag
2020
run: echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
2121

22-
- name: Set up Python 3.11
22+
- name: Set up Python
2323
uses: actions/setup-python@v4
2424
with:
25-
python-version: "3.11"
25+
python-version: 3.x
2626

2727
- name: Install and set up Poetry
28-
run: |
29-
curl -fsSL -o install-poetry.py https://install.python-poetry.org
30-
python install-poetry.py -y
31-
32-
- name: Update PATH
33-
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
28+
run: pipx install poetry
3429

3530
- name: Build project for distribution
3631
run: poetry build

.github/workflows/tests.yml

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,22 @@ on:
1010
- "**"
1111

1212
jobs:
13-
Linting:
14-
runs-on: ubuntu-latest
15-
16-
steps:
17-
- uses: actions/checkout@v3
18-
- uses: actions/setup-python@v4
19-
with:
20-
python-version: 3.x
21-
- uses: pre-commit/[email protected]
22-
2313
Tests:
24-
needs: Linting
2514
name: ${{ matrix.os }} / ${{ matrix.python-version }}
26-
runs-on: ${{ matrix.os }}-latest
15+
runs-on: ${{ matrix.os }}
2716
strategy:
2817
fail-fast: false
2918
matrix:
30-
os: [Ubuntu, MacOS, Windows]
31-
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
19+
os: [ubuntu-latest, macos-13, windows-latest]
20+
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", 3.12]
3221

3322
steps:
34-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
3524
with:
3625
submodules: "recursive"
3726

3827
- name: Set up Python ${{ matrix.python-version }}
39-
uses: actions/setup-python@v4
28+
uses: actions/setup-python@v5
4029
with:
4130
python-version: ${{ matrix.python-version }}
4231

@@ -47,22 +36,13 @@ jobs:
4736
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
4837
4938
- name: Install Poetry
50-
shell: bash
51-
run: curl -fsSL https://install.python-poetry.org | python - -y --version 1.4.0
52-
53-
- name: Update PATH
54-
if: ${{ matrix.os != 'Windows' }}
55-
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
56-
57-
- name: Update Path for Windows
58-
if: ${{ matrix.os == 'Windows' }}
59-
shell: bash
60-
run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH
39+
run: pipx install poetry
6140

6241
- name: Configure Poetry
6342
shell: bash
6443
run: |
6544
poetry config virtualenvs.in-project true
45+
poetry env use python
6646
6747
- name: Set up cache
6848
uses: actions/cache@v3

poetry.lock

Lines changed: 52 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)