diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dfb8f94f3..5a013f48b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 @@ -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 }} \ No newline at end of file diff --git a/README.md b/README.md index a813642b8..cb87f99e7 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,7 @@ # Viadot -
- - - -
- +[![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**: https://dyvenia.github.io/viadot/