From 5b30be9694598654b754a61433a93a6fad1b940e Mon Sep 17 00:00:00 2001 From: Venu Vardhan Reddy Tekula Date: Sat, 6 Jul 2024 12:18:58 -0400 Subject: [PATCH] [gha] Update github actions 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 --- .github/workflows/changelog.yml | 2 +- .github/workflows/release.yml | 19 ++++++++----------- .github/workflows/tests.yml | 2 +- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 3f4bdac..e083133 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -3,7 +3,7 @@ name: check changelog on: pull_request: paths: - - 'perceval/**' + - "perceval/**" jobs: check-changelog: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1081aa3..00f7277 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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] diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b4d1adc..f267c0d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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: