-
Notifications
You must be signed in to change notification settings - Fork 67
75 lines (64 loc) · 2.29 KB
/
install_test_ci.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
name: Install Test Python
on: [push, pull_request, workflow_dispatch]
jobs:
Install_Test_Python:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10","3.11"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up a virtual environment for Python ${{ matrix.python-version }}
if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'
run: |
python -m pip install --upgrade virtualenv
virtualenv venv
source venv/bin/activate
- name: Install the base dependencies
if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'
run: |
source venv/bin/activate
python -m pip install --upgrade poetry
- name: Check the correctness of the project config
if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'
run: |
source venv/bin/activate
poetry check
- name: Install the package
if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'
run: |
source venv/bin/activate
poetry install
- name: Set up a virtual environment
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
python -m pip install --upgrade virtualenv
python -m virtualenv venv
.\venv\Scripts\Activate.ps1
- name: Install the base dependencies
shell: pwsh
if: matrix.os == 'windows-latest'
run: |
.\venv\Scripts\Activate.ps1
python -m pip install --upgrade poetry
- name: Check the correctness of the project config
shell: pwsh
if: matrix.os == 'windows-latest'
run: |
.\venv\Scripts\Activate.ps1
poetry check
- name: Install the package
shell: pwsh
if: matrix.os == 'windows-latest'
run: |
.\venv\Scripts\Activate.ps1
poetry install