Skip to content

Commit

Permalink
[gha] Update github actions
Browse files Browse the repository at this point in the history
This commit updates the version number of the actions we use, it will now
use the commit SHA for security purposes. It also uses poetry support to
install only dev dependencies in the release process.

Signed-off-by: Venu Vardhan Reddy Tekula <[email protected]>
  • Loading branch information
vchrombie committed Jul 6, 2024
1 parent f8750c8 commit 5b30be9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: check changelog
on:
pull_request:
paths:
- 'perceval/**'
- "perceval/**"

jobs:
check-changelog:
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,30 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Download distribution artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: perceval-zulip-dist
path: dist
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry and add plugins
- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "PATH=$HOME/.poetry/bin:$PATH" >> $GITHUB_ENV
poetry self update --preview
poetry self add poetry-plugin-export
- name: Install dev dependencies
run: |
poetry export --without-hashes -f requirements.txt --output requirements-dev.txt --only dev
pip install -r requirements-dev.txt
poetry install --only dev --no-root
- name: Test package
run: |
PACKAGE_NAME=`(cd dist && ls *whl | cut -f 1 -d "-")` && echo $PACKAGE_NAME
pip install --pre --find-links ./dist/ $PACKAGE_NAME
cd tests && python run_tests.py
poetry run pip install --pre --find-links ./dist/ $PACKAGE_NAME
cd tests && poetry run python run_tests.py
release:
needs: [tests]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ["3.8", "3.9", "3.10", "3.11"]

name: Python ${{ matrix.python-version }}
steps:
Expand Down

0 comments on commit 5b30be9

Please sign in to comment.