-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (36 loc) · 1.09 KB
/
pipeline.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
37
38
39
40
41
42
43
44
45
46
name: Build & Test
on:
push:
branches:
- '*'
jobs:
build_and_test:
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Install Pytest
run: |
pip install pytest
- name: Build Package
run: |
python setup.py sdist
- name: Get Package File Name
run: |
$latestFile = Get-ChildItem -Path 'dist\' | Sort-Object LastWriteTime -Descending | Select-Object -First 1
echo "Latest file: $latestFile"
echo "PACKAGE_NAME=$latestFile" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Install Package
run: |
pip install ${{ env.PACKAGE_NAME }}
- name: Run Tests
run: |
pytest tests -vv -rEPW -o pytest_collection_order=alphabetical --cache-clear --color=yes