mirror of
https://github.com/Casvt/MIND.git
synced 2026-04-03 03:00:22 -04:00
Converted workflow to matrix
This commit is contained in:
79
.github/workflows/tests.yml
vendored
79
.github/workflows/tests.yml
vendored
@@ -1,73 +1,28 @@
|
||||
name: Tests
|
||||
|
||||
permissions: write-all
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- Development
|
||||
|
||||
jobs:
|
||||
p3_8:
|
||||
name: Python 3.8.0
|
||||
test:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.8", "3.9", "3.10", "3.11"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.8.0
|
||||
architecture: x64
|
||||
cache: 'pip'
|
||||
cache-dependency-path: requirements.txt
|
||||
- run: pip install -r requirements.txt
|
||||
- run: python3 -m unittest discover -s ./tests -p '*.py'
|
||||
|
||||
p3_9:
|
||||
name: Python 3.9.0
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.9.0
|
||||
architecture: x64
|
||||
cache: 'pip'
|
||||
cache-dependency-path: requirements.txt
|
||||
- run: pip install -r requirements.txt
|
||||
- run: python3 -m unittest discover -s ./tests -p '*.py'
|
||||
|
||||
p3_10:
|
||||
name: Python 3.10.0
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.10.0
|
||||
architecture: x64
|
||||
cache: 'pip'
|
||||
cache-dependency-path: requirements.txt
|
||||
- run: pip install -r requirements.txt
|
||||
- run: python3 -m unittest discover -s ./tests -p '*.py'
|
||||
|
||||
p3_11:
|
||||
name: Python 3.11.0
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.11.0
|
||||
architecture: x64
|
||||
cache: 'pip'
|
||||
cache-dependency-path: requirements.txt
|
||||
- run: pip install -r requirements.txt
|
||||
- run: python3 -m unittest discover -s ./tests -p '*.py'
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Run Tests
|
||||
run: python -m unittest discover -s ./tests -p '*.py'
|
||||
|
||||
Reference in New Issue
Block a user