forked from stanford-centaur/PyPantograph
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (61 loc) · 1.9 KB
/
test.yaml
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
name: Python Package with Conda from Miniconda Script
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
container:
image: debian:11
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Update apt and install dependencies
run: |
apt-get update && apt-get install -y wget bash curl git build-essential python3-pip
- name: Install elan
run: |
set -o pipefail
curl -sSfL https://github.com/leanprover/elan/releases/download/v3.1.1/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz
./elan-init -y --default-toolchain none
echo "$HOME/.elan/bin" >> "${GITHUB_PATH}"
which lake || exit 1
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Miniconda
shell: bash
run: |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
echo "$HOME/miniconda/bin" >> $GITHUB_PATH
source $HOME/miniconda/etc/profile.d/conda.sh
conda init bash
conda config --set always_yes yes --set changeps1 no
- name: Create and Activate Conda Environment
shell: bash
run: |
source $HOME/miniconda/etc/profile.d/conda.sh
conda create -n test-env python=${{ matrix.python-version }}
conda activate test-env
conda install pip
- name: Install Dependencies with Poetry
shell: bash
run: |
source $HOME/miniconda/etc/profile.d/conda.sh
conda activate test-env
pip install poetry
poetry build
which lake || exit 1
poetry install
- name: Run Tests
shell: bash
run: |
source $HOME/miniconda/etc/profile.d/conda.sh
conda activate test-env
poetry run pytest -s tests/