Init v0.0.1 #13
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
name: Build And Deploy | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build_and_deploy_job: | |
runs-on: ubuntu-latest | |
name: Build and Deploy Job | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
cache: 'pip' # caching pip dependencies | |
- name: Install pandoc | |
run: | | |
wget https://github.com/jgm/pandoc/releases/download/3.1.11/pandoc-3.1.11-1-amd64.deb | |
sudo dpkg -i pandoc-3.1.11-1-amd64.deb | |
- name: Build and Test | |
env: | |
OSS_ENDPOINT_NAME: ${{ secrets.OSS_ENDPOINT_NAME }} | |
OSS_BUCKET_NAME: ${{ secrets.OSS_BUCKET_NAME }} | |
OSS_ACCESS_KEY_ID: ${{ secrets.OSS_ACCESS_KEY_ID }} | |
OSS_ACCESS_KEY_SECRET: ${{ secrets.OSS_ACCESS_KEY_SECRET }} | |
shell: pwsh | |
run: | | |
pandoc -v | |
pip install -r "./scripts/requirements.txt" | |
pip install -U setuptools build | |
python -m build | |
pip install -U pytest pytest-cov | |
pip install (Get-Item "./dist/*.whl").FullName | |
# https://docs.codecov.com/docs/code-coverage-with-python | |
$package_location = (pip show pip | Select-String -Pattern 'Location: (.+)' | ForEach-Object { $_.Matches.Groups[1].Value }).Trim() | |
pytest ./tests --cov "${package_location}/pandoc_filter" | |
# - run: twine upload dist/*.whl -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} | |
# - name: Upload coverage reports to Codecov | |
- uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |