-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (45 loc) · 1.44 KB
/
testing.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
47
48
49
50
name: Python testing
on: [push, workflow_dispatch]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
minecraft_version: [1.13.2, 1.14.4, 1.15.2, 1.16.4]
python_version: [3.9]
include:
# Test the latest version on windows+mac
#- os: windows-latest
# minecraft_version: 1.16.4
# python_version: 3.9
- os: macOS-latest
minecraft_version: 1.16.4
python_version: 3.9
# Test with older python versions
- os: ubuntu-latest
minecraft_version: 1.16.4
python_version: 3.8
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
- name: OS specific setup (windows)
if: runner.os == 'Windows'
run: echo 'ACTIVATE_VENV=venv/Scripts/Activate.ps1' >> $GITHUB_ENV
- name: OS specific setup (linux/mac)
if: runner.os != 'Windows'
run: echo 'ACTIVATE_VENV=source venv/bin/activate' >> $GITHUB_ENV
- name: Install dependencies
run: |
python -m ensurepip --upgrade
python -m venv venv
${{ env.ACTIVATE_VENV }}
python -m pip install -r requirements.dev.txt
- name: Run tests
run: |
${{ env.ACTIVATE_VENV }}
pytest --server version:${{ matrix.minecraft_version }}