Skip to content

Commit

Permalink
Merge pull request #77 from UBC-MDS/m3_gitaction
Browse files Browse the repository at this point in the history
M3 gitaction upload
  • Loading branch information
nphaterp authored Mar 11, 2021
2 parents a91df2c + 1d39f55 commit 7bc3295
Show file tree
Hide file tree
Showing 8 changed files with 1,370 additions and 324 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: build

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install poetry
poetry install
- name: Check style
run: poetry run flake8 --exclude=docs*
- name: Test with pytest
run: poetry run pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
71 changes: 71 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Release

on:
push:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
pip install poetry
poetry install
- name: Check style
run: poetry run flake8 --exclude=docs*
- name: Test with pytest
run: |
poetry run pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
yml: ./codecov.yml
fail_ci_if_error: true
- name: checkout
uses: actions/checkout@master
with:
ref: main
- name: Bump version and tagging and publish
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git pull origin main
poetry run semantic-release version
poetry version $(grep "version" */__init__.py | cut -d "'" -f 2 | cut -d '"' -f 2)
git commit -m "Bump versions" -a
- name: Push package version changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Get release tag version from package version
run: |
echo ::set-output name=release_tag::$(grep "version" */__init__.py | cut -d "'" -f 2 | cut -d '"' -f 2)
id: release
- name: Create Release with new version
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.release.outputs.release_tag }}
release_name: ${{ steps.release.outputs.release_tag }}
draft: false
prerelease: false
- name: Build package and publish to test PyPI
env:
TEST_PYPI_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
TEST_PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
run: |
poetry config repositories.test-pypi https://test.pypi.org/legacy/
poetry build
poetry publish -r test-pypi -u $TEST_PYPI_USERNAME -p $TEST_PYPI_PASSWORD
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

DRY out your regression analysis!

![](https://github.com/ansarusc/aridanalysis/workflows/build/badge.svg) [![codecov](https://codecov.io/gh/ansarusc/aridanalysis/branch/main/graph/badge.svg)](https://codecov.io/gh/ansarusc/aridanalysis) ![Release](https://github.com/ansarusc/aridanalysis/workflows/Release/badge.svg) [![Documentation Status](https://readthedocs.org/projects/aridanalysis/badge/?version=latest)](https://aridanalysis.readthedocs.io/en/latest/?badge=latest)
![](https://github.com/ansarusc/aridanalysis/workflows/build/badge.svg) [![codecov](https://codecov.io/gh/UBC-MDS/aridanalysis_py/branch/main/graph/badge.svg?token=JGT4Z519QD)](https://codecov.io/gh/UBC-MDS/aridanalysis_py)![Release](https://github.com/ansarusc/aridanalysis/workflows/Release/badge.svg) [![Documentation Status](https://readthedocs.org/projects/aridanalysis/badge/?version=latest)](https://aridanalysis.readthedocs.io/en/latest/?badge=latest)

## Python Package for Inferential Regression and EDA Analysis!

Expand Down
Loading

0 comments on commit 7bc3295

Please sign in to comment.