Move tests into main workflows.

The workflow UI works best if there's only a single main workflow in a
PR. We can keep things organized similarly by turning the test workflow
into a reusable workflow. Same code (mostly), better UI.
This commit is contained in:
Dan Albert 2022-07-27 20:24:21 -07:00
parent 6437700a61
commit 151cf17e35
3 changed files with 12 additions and 20 deletions

View File

@ -6,6 +6,9 @@ jobs:
lint: lint:
uses: ./.github/workflows/lint.yml uses: ./.github/workflows/lint.yml
test:
uses: ./.github/workflows/test.yml
build: build:
runs-on: windows-latest runs-on: windows-latest
steps: steps:

View File

@ -8,6 +8,9 @@ jobs:
lint: lint:
uses: ./.github/workflows/lint.yml uses: ./.github/workflows/lint.yml
test:
uses: ./.github/workflows/test.yml
build: build:
runs-on: windows-latest runs-on: windows-latest
steps: steps:

View File

@ -1,30 +1,16 @@
name: Test name: Tests
on: workflow_call
on: [push, pull_request]
jobs: jobs:
build: python-tests:
name: Python tests
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: true submodules: true
- name: Set up Python - name: Set up Python environment
uses: actions/setup-python@v2 uses: ./.github/actions/setup-liberation-python
with:
python-version: "3.10"
- name: Install environment
run: |
python -m venv ./venv
- name: Install dependencies
run: |
./venv/scripts/activate
python -m pip install -r requirements.txt
# For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead
Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force
- name: run tests - name: run tests
run: | run: |