Skip to content

Commit

Permalink
add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
sigma67 committed Apr 8, 2023
1 parent 4e7058d commit 40c42fa
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Code coverage

on:
push

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: 3.x
- name: Generate coverage report
env:
HEADERS_AUTH: ${{ secrets.HEADERS_AUTH }}
TEST_CFG: ${{ secrets.TEST_CFG }}
run: |
pip install -e .
pip install coverage
cat <<< "$SETTINGS_INI" > spotify_to_ytmusic/settings.ini
coverage run
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: coverage.xml
flags: unittests
fail_ci_if_error: true
29 changes: 29 additions & 0 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 40c42fa

Please sign in to comment.