From cc417ea5ed5f40e3a368b049d4709010f53a3bae Mon Sep 17 00:00:00 2001 From: Michael Bianco Date: Thu, 19 Oct 2023 16:45:24 -0600 Subject: [PATCH] ci: use asdf for py and poetry versions --- .github/workflows/cd.yml | 7 +++++-- .github/workflows/ci.yml | 16 +++++++++++----- .github/workflows/codecov.yml | 7 +++++-- .github/workflows/docs.yml | 7 +++++-- .tool-versions | 2 ++ 5 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 .tool-versions diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index e372e86..c00e670 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -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: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81f05f8..8c9cdac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 . diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 5c99964..7442673 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -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 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 54883c1..11d1730 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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 diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..6b735fe --- /dev/null +++ b/.tool-versions @@ -0,0 +1,2 @@ +python 3.10.4 +poetry 1.6.1