Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
related to non functional code (CI etc.)
  • Loading branch information
stevenbal committed Aug 5, 2024
1 parent f8387b2 commit a5adf2c
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 82 deletions.
61 changes: 11 additions & 50 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ jobs:

steps:
- name: Checkout Open Forms
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: open-formulieren/open-forms
path: open-forms

- name: Checkout StUF-ZDS payments extension
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: extension

- name: Set up backend environment
uses: maykinmedia/[email protected]
with:
apt-packages: 'libxml2-dev libxmlsec1-dev libxmlsec1-openssl gettext postgresql-client gdal-bin'
apt-packages: 'libxml2 libxmlsec1 libxmlsec1-openssl gettext postgresql-client gdal-bin'
python-version: '3.12'
optimize-postgres: 'yes'
pg-service: 'postgres'
Expand Down Expand Up @@ -77,71 +77,32 @@ jobs:
working-directory: ${{ github.workspace }}/open-forms

- name: Publish coverage report
uses: codecov/codecov-action@v3.1.4
uses: codecov/codecov-action@v4
with:
root_dir: ${{ github.workspace }}/extension
working-directory: ${{ github.workspace }}/open-forms
files: ./coverage-extension.xml

docker_build:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set tag
id: vars
run: |
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name (if present at all)
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Use Docker `latest` tag convention
[ "$VERSION" == "main" ] && VERSION=latest
# PRs result in version 'merge' -> transform that into 'latest'
[ "$VERSION" == "merge" ] && VERSION=latest
echo ::set-output name=tag::${VERSION}
- name: Build the Docker image
run: |
docker build . \
--tag $IMAGE_NAME:$RELEASE_VERSION
env:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}

- run: docker image save -o image.tar $IMAGE_NAME:${{ steps.vars.outputs.tag }}
- name: Store image artifact
uses: actions/upload-artifact@v3
with:
name: docker-image
path: image.tar
retention-days: 1

publish:
name: Publish package to PyPI
runs-on: ubuntu-latest
needs:
- tests
- docker_build
environment: release
permissions:
id-token: write

if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Build sdist and wheel
run: |
pip install pip setuptools wheel --upgrade
python setup.py sdist bdist_wheel
pip install pip build --upgrade
python -m build --sdist --wheel
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
4 changes: 1 addition & 3 deletions .github/workflows/code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ jobs:
strategy:
matrix:
toxenv: [isort, black, flake8]
env:
PIP_CONSTRAINT: pip-constraints.txt
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
- name: Install dependencies
run: pip install tox
- run: tox
Expand Down
22 changes: 0 additions & 22 deletions Dockerfile

This file was deleted.

4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Welcome to stuf_zds_payments's documentation!
:Version: 0.1.0
:Source: https://github.com/maykinmedia/stuf_zds_payments
:Keywords: ``<keywords>``
:PythonVersion: 3.11
:PythonVersion: 3.12

|build-status| |code-quality| |black| |coverage| |docs|

Expand All @@ -30,7 +30,7 @@ Installation
Requirements
------------

* Python 3.11 or above
* Python 3.12 or above
* Django 4.2 or newer


Expand Down
1 change: 0 additions & 1 deletion pip-constraints.txt

This file was deleted.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ classifiers = [
"Operating System :: Unix",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.11"
requires-python = ">=3.12"
dependencies = [
"django>=4.2"
]
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py{310,311,312}-django{42}
py{312}-django{42}
isort
black
flake8
Expand All @@ -9,7 +9,6 @@ skip_missing_interpreters = true

[gh-actions]
python =
3.11: py311
3.12: py312

[gh-actions:env]
Expand Down

0 comments on commit a5adf2c

Please sign in to comment.