Skip to content

Commit

Permalink
ci: use asdf for py and poetry versions
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveitaly committed Oct 19, 2023
1 parent 846d668 commit cc417ea
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 11 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@ jobs:
if: needs.release-please.outputs.release_created
steps:
- uses: actions/checkout@v4
- name: ASDF Parse
uses: kota65535/github-asdf-parse-action@v1.1.0
id: versions
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "${{ steps.versions.outputs.python }}"
architecture: x64
- uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: "1.1.13"
poetry-version: "${{ steps.versions.outputs.poetry }}"
- run: poetry build
- run: poetry publish
env:
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,21 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.10", "3.9", "3.8", "3.7"]
python-version: ["3.11", "3.10", "3.9", "3.8"]
extras: ["", all, soap_api, orjson, cli]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: ASDF Parse
uses: kota65535/github-asdf-parse-action@v1.1.0
id: versions
- uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
architecture: x64
- uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: "1.1.13"
poetry-version: "${{ steps.versions.outputs.poetry }}"
- run: poetry install --extras ${{ matrix.extras }}
if: matrix.extras != ''
- run: poetry install
Expand All @@ -36,14 +39,17 @@ jobs:
extras: [all]
steps:
- uses: actions/checkout@v4
- name: ASDF Parse
uses: kota65535/github-asdf-parse-action@v1.1.0
id: versions
- uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
python-version: "${{ steps.versions.outputs.python }}"
architecture: x64
- uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: "1.1.13"
- run: poetry install --extras ${{ matrix.extras }}
poetry-version: "${{ steps.versions.outputs.poetry }}"
- run: poetry install --extras all
- run: poetry run flake8
- run: poetry run mypy --ignore-missing-imports .
- run: poetry run isort --check --diff .
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: ASDF Parse
uses: kota65535/github-asdf-parse-action@v1.1.0
id: versions
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "${{ steps.versions.outputs.python }}"
architecture: x64
- uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: "1.1.13"
poetry-version: "${{ steps.versions.outputs.poetry }}"
- run: poetry install --extras all
- run: poetry run pytest --cov=netsuite --cov-report=xml --cov-report=term
- uses: codecov/codecov-action@v3
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: ASDF Parse
uses: kota65535/github-asdf-parse-action@v1.1.0
id: versions
- uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "${{ steps.versions.outputs.python }}"
architecture: x64
- uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: "1.1.13"
poetry-version: "${{ steps.versions.outputs.poetry }}"
- run: poetry install --extras all
- run: poetry run mkdocs build
- uses: peaceiris/actions-gh-pages@v3.9.3
Expand Down
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
python 3.10.4
poetry 1.6.1

0 comments on commit cc417ea

Please sign in to comment.