Skip to content

Commit

Permalink
feat: Add ability to install plugins as part of the action setup (#66)
Browse files Browse the repository at this point in the history
* Use latest SemVer PR

* Drop EOL Python 3.7. Use more modern Poetry versions in tests

* Update examples

* Add ability to install plugins and install export plugin by default

* Do not install any plugins by default

* Only run steps if some plugins are specified
  • Loading branch information
xSAVIKx committed Dec 29, 2023
1 parent 437d4fa commit a5643c6
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Expand Up @@ -10,13 +10,13 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
poetry-version: ["latest", "1.0", "1.1.15", "1.2.2", "1.3.1"]
os: [ubuntu-20.04, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
poetry-version: ["latest", "1.2.2", "1.3.2", "1.4.2", "1.5.1", "1.6.1"]
os: [ubuntu-22.04, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Run image
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-pr.yml
Expand Up @@ -10,6 +10,6 @@ jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v3.4.0
- uses: amannn/action-semantic-pull-request@v5.4.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -29,12 +29,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
poetry-version: ["1.0", "1.1.15"]
os: [ubuntu-18.04, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
poetry-version: ["1.2.2", "1.7.1"]
os: [ubuntu-22.04, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
# see details (matrix, python-version, python-version-file, etc.)
Expand Down
11 changes: 11 additions & 0 deletions action.yml
Expand Up @@ -9,6 +9,10 @@ inputs:
description: "The version of poetry to install"
required: false
default: "latest"
poetry-plugins:
description: "The whitespace/newline-separated list of poetry plugins to install."
required: false
default: ""
runs:
using: "composite"
steps:
Expand All @@ -20,3 +24,10 @@ runs:
run: |
pip install poetry==${{ inputs.poetry-version }}
shell: bash
- if: ${{ inputs.poetry-plugins != '' }}
run: |
ALL_PLUGINS=$(echo "${{ inputs.poetry-plugins }}")
for PLUGIN in $ALL_PLUGINS; do
poetry self add $PLUGIN
done
shell: bash

0 comments on commit a5643c6

Please sign in to comment.