Skip to content

Commit

Permalink
📝 Added cov and docs to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
trymzet committed Jul 8, 2021
1 parent d7a103d commit f0e5382
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 39 deletions.
63 changes: 30 additions & 33 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
on:
push:
branches:
- "main"
- "[0-9].[0-9]+.[0-9]+"
pull_request:
branches:
- "main"
- "[0-9].[0-9]+.[0-9]+"
name: build

on:
push:
branches:
- "main"
- "[0-9].[0-9]+.[0-9]+"
pull_request:
branches:
- "main"
- "[0-9].[0-9]+.[0-9]+"

env:
IMAGE_NAME: viadot
Expand Down Expand Up @@ -70,30 +72,14 @@ jobs:
run: |
pytest tests/unit
# publish_docs:
# needs: build
# runs-on: ubuntu-latest
# if: github.event_name == 'push'
# steps:
# - name: Checkout Master
# uses: actions/checkout@v2

# - name: Set up Python 3.7
# uses: actions/setup-python@v2
# with:
# python-version: 3.8

# - name: Install MkDocs
# run: |
# python -m pip install --upgrade pip
# pip install mkdocs-material mkdocstrings

# - name: Publish docs to GitHub Pages
# run: |
# git pull
# pip install -r requirements.txt
# pip install -e .
# mkdocs gh-deploy --force
- name: Generate coverage report
run: |
pytest --cov-report xml --cov=viadot tests/
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true

publish_docker:
needs: build
Expand Down Expand Up @@ -127,3 +113,14 @@ jobs:
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
publish_docs:
name: Publish docs
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v2
- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# Viadot
<p>
<a href="https://github.com/psf/black" target="_blank">
<img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Build">
</a>
</p>

[![build status](https://github.com/dyvenia/viadot/actions/workflows/build/badge.svg)](https://github.com/dyvenia/viadot/actions/workflows/build)
[![formatting](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![codecov](https://codecov.io/gh/Trymzet/dyvenia/branch/main/graph/badge.svg?token=k40ALkXbNq)](https://codecov.io/gh/Trymzet/dyvenia)
---

**Documentation**: <a href="https://dyvenia.github.io/viadot/" target="_blank">https://dyvenia.github.io/viadot/</a>
Expand Down

0 comments on commit f0e5382

Please sign in to comment.