-
Notifications
You must be signed in to change notification settings - Fork 27
56 lines (48 loc) · 1.56 KB
/
builds.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
name: Build package
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
env:
HYPOTHESIS_PROFILE: ci
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11']
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.python-version }}
cancel-in-progress: true
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Build and install Mr Mustard
run: |
python -m pip install --no-cache-dir --upgrade pip
pip install --no-cache-dir poetry==1.4.0
poetry config virtualenvs.create false
poetry build
pip install dist/mrmustard*.whl
# Move to 'src' to properly test only installed package
# https://docs.pytest.org/en/7.1.x/explanation/goodpractices.html#tests-outside-application-code
mkdir src
mv mrmustard src
- name: Install only test dependencies
run: poetry install --no-root --extras "ray" --with dev
- name: Setup Julia
uses: julia-actions/setup-julia@v1
with:
version: 1.9.3
- name: Setup Julia part 2
run: julia --project="julia_pkg" -e "using Pkg; Pkg.instantiate()"
- name: Run tests
run: python -m pytest tests -p no:warnings --tb=native --backend=tensorflow