-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (33 loc) · 1.16 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Test
on:
push:
branches:
- main
- dev
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: 3.12
activate-environment: pandoc_filter_dev
environment-file: ./scripts/etc/environment.yml
- name: distribution package 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: |
python -m build
pip install (Get-Item "./dist/*.whl").FullName
$package_path = "$(((pip show pandoc-filter) -match 'Location:')[0] -replace 'Location:\s+')/pandoc_filter"
$Env:PYTHONIOENCODING='utf-8'
pytest (Get-Item "./tests").FullName --log-level=INFO --cov=$package_path --cov-report=xml
- uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}