-
Notifications
You must be signed in to change notification settings - Fork 19
47 lines (43 loc) · 1.28 KB
/
ci-production.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
name: CI - Pytest Production
on:
workflow_dispatch:
pull_request:
branches:
- production
jobs:
build:
# Jobs definition
runs-on: ${{ matrix.os }}
if: ${{ !github.event.pull_request.draft }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: ['3.10', '3.11', '3.12']
name: pytest (Python ${{ matrix.python-version }}) (OS ${{ matrix.os }})
# Configure tests
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: create package
run: python -m build --sdist
- name: import open-mastr
run: python -m pip install ./dist/open_mastr-0.14.5.tar.gz
- name: Create credentials file
env:
MASTR_TOKEN: ${{ secrets.MASTR_TOKEN }}
MASTR_USER: ${{ secrets.MASTR_USER }}
run: |
python -c "from tests import preparation; preparation.create_credentials_file()"
- name: Install pytest
run: |
python -m pip install pytest
- name: Test with pytest
run: |
pytest -vv