-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
185 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Conda | ||
on: [push] | ||
jobs: | ||
Main-package: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ["3.11"] | ||
env: | ||
OS: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
mamba-version: "*" | ||
#use-mamba: true | ||
auto-update-conda: false | ||
environment-file: environment.yml | ||
auto-activate-base: false | ||
activate-environment: test | ||
python-version: ${{ matrix.python-version }} | ||
channels: conda-forge,defaults | ||
channel-priority: true | ||
show-channel-urls: true | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: x64 | ||
|
||
- name: Install dev-dependencies | ||
run: | | ||
python -m pip install -r requirements-dev.txt | ||
- name: Run tests | ||
shell: bash -el {0} | ||
run: | | ||
conda info | ||
conda list | ||
conda config --show-sources | ||
conda config --show | ||
pytest -sv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Create GitHub Release | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup GitHub CLI | ||
run: | | ||
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y) | ||
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \ | ||
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \ | ||
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ | ||
&& sudo apt update \ | ||
&& sudo apt install gh -y | ||
- name: Extract tag name | ||
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | ||
|
||
|
||
- name: Create GitHub Release | ||
id: create_release | ||
run: | | ||
gh release create $TAG_NAME --title "$TAG_NAME" --notes-from-tag | ||
env: | ||
GH_TOKEN: ${{ secrets.CREATE_RELEASE }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# This workflows will upload a Python Package using Twine when a release is created | ||
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries | ||
|
||
name: pypi-publish | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [released, published, created] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
- name: Install tools | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERS }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: CI | ||
on: [push, pull_request] | ||
jobs: | ||
Run: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest] #, macos-latest, windows-latest | ||
python-version: ["3.9" ] # "3.7", "3.8", | ||
env: | ||
OS: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@master | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: x64 | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
miniconda-version: "latest" | ||
channels: conda-forge | ||
allow-softlinks: true | ||
channel-priority: flexible | ||
show-channel-urls: true | ||
|
||
- name: Install dependencies | ||
run: | | ||
$CONDA/bin/conda install --yes --file requirements.txt | ||
python setup.py install | ||
# - name: Lint with flake8 | ||
# run: | | ||
# # add CONDA/bin/ in front of everything | ||
# $CONDA/bin/conda install flake8 | ||
# # stop the build if there are Python syntax errors or undefined names | ||
# $CONDA/bin/flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
# $CONDA/bin/flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Generate coverage report | ||
# working-directory: ../ | ||
run: | | ||
pwd | ||
$CONDA/bin/pytest --cov=statista --cov-report=xml | ||
# - name: Upload coverage to Codecov | ||
# uses: codecov/codecov-action@v1 | ||
# with: | ||
# token: ${{ secrets.CODECOV_TOKEN }} | ||
# files: ./coverage1.xml,./coverage2.xml | ||
# directory: ./coverage/reports/ | ||
# flags: unittests | ||
# env_vars: OS,PYTHON | ||
# name: codecov-umbrella | ||
# fail_ci_if_error: true | ||
# path_to_write_report: ./coverage/codecov_report.txt | ||
# verbose: true | ||
|
||
- name: Coveralls GitHub Action | ||
uses: coverallsapp/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
github-token: ${{ secrets.github_token }} | ||
files: ./coverage1.xml,./coverage2.xml | ||
directory: ./coverage/reports/ |