Skip to content

Updata CITATION.cff and README.md #4

Updata CITATION.cff and README.md

Updata CITATION.cff and README.md #4

Workflow file for this run

name: ci
on:
push:
branches:
- main
tags:
- "*"
pull_request:
branches:
- main
jobs:
pytest:
name: Run pytest πŸ§ͺ
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.14']
services:
postgres:
image: postgres:latest
env:
POSTGRES_PASSWORD: postgres_password
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout repo πŸ›ŽοΈ
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }} 🐍
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install package πŸ“¦
run: |
python3 -m pip install --upgrade pip setuptools
python3 -m pip install psycopg2-binary
python3 -m pip install -e .
python3 -m pip install -e .[pytest]
- name: Setup environment file πŸ”
run: |
echo "SECRET_KEY=thisisnotaverysecretkey" >> $GITHUB_ENV
echo "DATABASE=postgresql://postgres:postgres_password@localhost/django_datacite" >> $GITHUB_ENV
- name: Run pytest πŸ§ͺ
run: |
pytest --cov
- name: Run coveralls πŸ“Š
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ${{ matrix.python-version }}
parallel: true
coveralls:
name: Upload to coveralls πŸ“Š
needs: pytest
runs-on: ubuntu-latest
steps:
- name: Upload to coveralls πŸ“Š
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
carryforward: "3.7,3.14"
build:
name: Build distribution πŸ‘·
needs: pytest
runs-on: ubuntu-latest
steps:
- name: Checkout repo πŸ›ŽοΈ
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Python 🐍
uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Install build 🧱
run: python3 -m pip install build --user
- name: Build a binary wheel and a source tarball πŸ› οΈ
run: python3 -m build
- name: Store the distribution packages πŸ“€
uses: actions/upload-artifact@v5
with:
name: python-package-distributions
path: dist/
pypi:
name: Publish distribution to PyPI πŸ“¦
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/django-datacite
permissions:
id-token: write
steps:
- name: Download the distribution packages πŸ“₯
uses: actions/download-artifact@v6
with:
name: python-package-distributions
path: dist/
- name: Publish to PyPI πŸš€
uses: pypa/gh-action-pypi-publish@release/v1