Skip to content
Snippets Groups Projects
Commit 78c92356 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

Merge branch 'develop' of https://github.com/piotrmaslanka/satella into develop

parents 1aba693d 34af6f6f
No related branches found
No related tags found
No related merge requests found
......@@ -2,48 +2,83 @@ name: build-satella
run-name: ${{ github.actor }}
on: [ push ]
jobs:
prepare-system:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: [ "3.9" ]
steps:
- uses: actions/checkout@4
- uses: actions/setup-python@4
- name: Install everything
run: pip install -e .[test,dev,extras]
with:
python-version: '${{ matrix.python-version }}'
cache: 'pip'
paths: ["dist/*"]
tests:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [ "3.6", "3.7", "3.8", "pypy3.9", "pypy3.10", "3.9", "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@4
- uses: actions/setup-python@4
- uses: actions/checkout@main
- uses: actions/setup-python@main
with:
python-version: '${{ matrix.python-version }}'
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install everything
run: |
sudo apt-get update
sudo apt-get install -y python3-setuptools python3-yaml
pip install -U pip setuptools wheel disttools packaging
pip install -U -e .[test,dev]
- name: Test everything
run: pytest -n 8 -vv --cov=satella
upload-coverage:
runs-on: "ubuntu-latest"
needs: ["tests"]
steps:
- uses: actions/setup-python@main
with:
python-version: '${{ matrix.python-version }}'
cache: 'pip'
build-package:
needs: ["prepare-system"]
runs-on: ubuntu-latest
python-version: '3.10'
- run: coverage xml
- uses: caffco/code-climate-github-action@v1.0.0
build-project:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [ "3.6.15", "3.7.1", "3.8.18", "pypy3.9", "pypy3.10", "3.9", "3.10", "3.11", "3.12" ]
steps:
- name: Build package
- uses: actions/setup-python@main
name: Setup Python
with:
python-version: '$${{ matrix.version }}'
cache: 'pip'
- name: Update system
run: |
sudo apt-get update
sudo apt-get install -y python3-setuptools python3-yaml
pip install -U pip setuptools wheel disttools packaging
- name: Alter Version
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
run: |
echo -e '__version__ = "' > satella/__init__.py
echo -e '${{ github.event.release.tag_name }}' >> satella/__init__.py
echo '"' >> satella/__init__.py
python -v
- name: Build
run: python -m build .
- name: Store credentials
- name: Archive production artifacts
uses: actions/upload-artifact@master
with:
name: builds
path: |
dist
send-to-pypi:
runs-on: "ubuntu-latest"
needs: ["build-project", "tests"]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- uses: actions/setup-python@main
name: Setup Python
with:
python-version: '3.10'
cache: 'pip'
- name: Install Twine
run: pip install twine
- name: Download all builds artifacts
uses: actions/download-artifact@main
with:
name: builds
- name: Send over packages to PyPI
run: |
echo $PYPIRC_PASSWORD_DATA > ~/.pypirc
twine upload dist/*
convert-and-upload-coverage:
needs: ["build-package", "tests"]
steps:
- run: coverage xml
- uses: caffco/code-climate-github-action@v1.0.0
satella
========
[![Build Status](https://circleci.com/gh/piotrmaslanka/satella.svg?style=svg)](https://app.circleci.com/pipelines/github/piotrmaslanka/satella)
[![Test Coverage](https://api.codeclimate.com/v1/badges/34b392b61482d98ad3f0/test_coverage)](https://codeclimate.com/github/piotrmaslanka/satella/test_coverage)
![example workflow](https://github.com/piotrmaslanka/satella/actions/workflows/main.yml/badge.svg)[![Test Coverage](https://api.codeclimate.com/v1/badges/34b392b61482d98ad3f0/test_coverage)](https://codeclimate.com/github/piotrmaslanka/satella/test_coverage)
[![Code Climate](https://codeclimate.com/github/piotrmaslanka/satella/badges/gpa.svg)](https://codeclimate.com/github/piotrmaslanka/satella)
[![Issue Count](https://codeclimate.com/github/piotrmaslanka/satella/badges/issue_count.svg)](https://codeclimate.com/github/piotrmaslanka/satella)
[![PyPI](https://img.shields.io/pypi/pyversions/satella.svg)](https://pypi.python.org/pypi/satella)
......@@ -56,6 +55,13 @@ pip install satella[extras]
Running unit tests
------------------
Tests run by default on CircleCI.
Tests run by default on GitHub Actions.
They should pass on Windows too, but some tests requiring POSIX-like functionality are skipped.
Automatic release system
------------------------
Releases happen automatically. Just add a tag with the name of the version.
**NOTE that changes from 2.25 will be numbered as tags without the prefix ```v```**!
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment