Skip to content

Post Deploy Test

Post Deploy Test #12

name: Post Deploy Test
on:
workflow_run:
workflows: ["Build and Upload Python Package"]
types:
- completed
jobs:
post_deploy_test_job:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{runner.os}}-conda-${{env.CACHE_NUMBER}}-${{hashFiles('./scripts/etc/conda_env_dev_linux.yml')}}
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: 3.12
activate-environment: pandoc_filter_dev
environment-file: ./scripts/etc/conda_env_dev_linux.yml
- 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: |
pip install -i https://pypi.org/simple/ --pre -U pandoc-filter
pytest (Get-Item "./tests").FullName --log-level=INFO --cov $Env:PYTHONPATH --cov-report=xml
- uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}