Skip to content

Commit

Permalink
Refactor GitHub workflows and prepare release 0.12.0 (#154)
Browse files Browse the repository at this point in the history
* Prepare release 0.12.0
* Simplified workflows
  • Loading branch information
ckunki authored Jul 11, 2024
1 parent ea2f417 commit 41b7439
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 132 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:

cd-job:
name: Continues Delivery
name: Continuous Delivery
runs-on: ubuntu-latest
steps:

Expand Down
69 changes: 5 additions & 64 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: workflow_call
jobs:

version-check-job:
name: Version Check
name: Version Check & Build Documentation
runs-on: ubuntu-latest

steps:
Expand All @@ -20,24 +20,12 @@ jobs:
- name: Check Version(s)
run: poetry run version-check exasol/bucketfs/version.py

build-documentation-job:
name: Build Documentation
needs: [version-check-job]
runs-on: ubuntu-latest

steps:
- name: SCM Checkout
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.12.0

- name: Build Documentation
run: |
poetry run python -m nox -s build-docs
lint-job:
name: Linting (Python-${{ matrix.python-version }})
name: Linting and Type checks (Python-${{ matrix.python-version }})
needs: [version-check-job]
runs-on: ubuntu-latest
strategy:
Expand All @@ -57,58 +45,11 @@ jobs:
- name: Run Tests
run: poetry run nox -s lint

- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: .lint.txt
path: .lint.txt

type-check-job:
name: Type Checking (Python-${{ matrix.python-version }})
needs: [version-check-job]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- name: SCM Checkout
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.12.0
with:
python-version: ${{ matrix.python-version }}

- name: Run Tests
- name: Run type-check
run: poetry run nox -s type-check

tests-job:
name: Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}})
needs: [build-documentation-job, lint-job, type-check-job]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
exasol-version: ["7.1.9"]

steps:
- name: SCM Checkout
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.12.0
with:
python-version: ${{ matrix.python-version }}

- name: Run Tests
run: poetry run nox -s coverage -- -- --db-version ${{ matrix.exasol-version }}

- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: .coverage
path: .coverage

name: .lint.txt
path: .lint.txt
17 changes: 9 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
name: CI

on:
push:
branches-ignore:
- "github-pages/*"
- "gh-pages/*"
- "main"
- "master"
pull_request:
types: [opened, reopened]
schedule:
# “At 00:00 on every 7th day-of-month from 1 through 31.” (https://crontab.guru)
- cron: "0 0 1/7 * *"
Expand Down Expand Up @@ -45,7 +38,13 @@ jobs:
working-directory: ../integration-test-docker-environment

- name: Run Tests
run: poetry run pytest tests
run: poetry run nox -s coverage

- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: .coverage
path: .coverage

metrics:
needs: [ fast-tests ]
Expand All @@ -60,6 +59,7 @@ jobs:
run: true

slow-test-detection:
name: Run Slow or Expensive Tests (e.g. SaaS)?
runs-on: ubuntu-latest
steps:
- name: Detect Slow Tests
Expand All @@ -68,6 +68,7 @@ jobs:
slow-tests

run-slow-tests:
name: Run Slow or Expensive Tests (e.g. SaaS) if Requested
runs-on: ubuntu-latest
needs: [ slow-test-detection ]

Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/pr-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,10 @@ on:

jobs:

ci-job:
name: Checks
uses: ./.github/workflows/checks.yml

publish-docs:
name: Publish Documentation
uses: ./.github/workflows/gh-pages.yml

metrics:
needs: [ ci-job ]
uses: ./.github/workflows/report.yml

tests-job:
name: Tests (Python-${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: abatilo/actions-poetry@v3.0.0
with:
poetry-version: 1.2.2

- name: Install Project
run: poetry install

- name: Checkout ITDE
run: git clone https://github.com/exasol/integration-test-docker-environment.git
working-directory: ..

- name: Start EXASOL Test-Environment
run: ./start-test-env spawn-test-environment --environment-name test --database-port-forward 8888 --bucketfs-port-forward 6666 --db-mem-size 4GB
working-directory: ../integration-test-docker-environment

- name: Run Tests
run: poetry run pytest tests

2 changes: 2 additions & 0 deletions doc/changes/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 📝 Changes

* [unreleased](unreleased.md)
* [0.12.0](changes_0.12.0.md)
* [0.11.0](changes_0.11.0.md)
* [0.10.0](changes_0.10.0.md)
* [0.9.0](changes_0.9.0.md)
Expand All @@ -18,6 +19,7 @@
hidden:
---
unreleased
changes_0.12.0
changes_0.11.0
changes_0.10.0
changes_0.9.0
Expand Down
22 changes: 22 additions & 0 deletions doc/changes/changes_0.12.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 0.12.0 - 2024-07-11

## Summary

The current release adds a dependency to plugin `pytest_exasol_saas` and replaces individual test fixtures by those provided by the plugin.

Additionally the release fixes vulnerabilities by updating dependencies.

## Security

* Fixed vulnerabilities by updating dependencies
* Vulnerability CVE-2024-21503 in transitive dependency via `exasol-toolbox` to `black` in versions below `24.3.0`
* Vulnerability CVE-2024-35195 in dependency `requests` in versions below `2.32.0`

## Refactorings

* #141: Used plugin `pytest_exasol_saas`

## Documentation

* #144: Added comment on using fixtures from pytest-plugin `pytest-exasol-saas`
* #147: Added documentation for the SaaS and the PathLike interface.
21 changes: 0 additions & 21 deletions doc/changes/unreleased.md
Original file line number Diff line number Diff line change
@@ -1,22 +1 @@
# Unreleased

## Summary

The current release adds a dependency to plugin `pytest_exasol_saas` and replaces individual test fixtures by those provided by the plugin.

Additionally the release fixes vulnerabilities by updating dependencies.

## Security

* Fixed vulnerabilities by updating dependencies
* Vulnerability CVE-2024-21503 in transitive dependency via `exasol-toolbox` to `black` in versions below `24.3.0`
* Vulnerability CVE-2024-35195 in dependency `requests` in versions below `2.32.0`

## Refactorings

* #141: Used plugin `pytest_exasol_saas`

## Documentation

* #144: Added comment on using fixtures from pytest-plugin `pytest-exasol-saas`
* #147: Added documentation for the SaaS and the PathLike interface.
2 changes: 1 addition & 1 deletion exasol/bucketfs/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
# Do not edit this file manually!
# If you need to change the version, do so in the project.toml, e.g. by using `poetry version X.Y.Z`.
MAJOR = 0
MINOR = 11
MINOR = 12
PATCH = 0
VERSION = f"{MAJOR}.{MINOR}.{PATCH}"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ packages = [
{include = "exasol"},
{include = "exasol_bucketfs_utils_python"}
]
version = "0.11.0"
version = "0.12.0"
description = "BucketFS utilities for the Python programming language"

license = "MIT"
Expand Down

0 comments on commit 41b7439

Please sign in to comment.