-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (57 loc) · 2.4 KB
/
run-installation-tests.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
72
73
74
75
76
77
78
name: Run Installation Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
container:
image: davhofer/py2spack-spack-installation-test:latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Python package and dependencies
run: python -m pip install .
- name: Check PYTHONPATH
run: echo $PYTHONPATH
- name: Check SPACK_ROOT
run: echo $SPACK_ROOT
# Test tqdm installation
- name: Remove tqdm
run: |
rm -rd $SPACK_PKGS/py-tqdm || true
- name: Run py2spack conversion
run: py2spack --versions-per-package 5 --max-conversions 2 tqdm
- name: Install py-tqdm with Spack
run: $SPACK_ROOT/bin/spack install py-tqdm
- name: Load py-tqdm with Spack and test import
run: cd $SPACK_ROOT && . share/spack/setup-env.sh && spack load py-tqdm && python -c 'import tqdm;'
- name: Check if the last command succeeded
run: echo "tqdm import succeeded"
if: success()
# Test pygments installation
- name: Remove pygments and dependency colorama
run: |
rm -rd $SPACK_PKGS/py-pygments || true
rm -rd $SPACK_PKGS/py-colorama || true
- name: Run py2spack conversion
run: py2spack --versions-per-package 5 --max-conversions 2 pygments
- name: Install py-pygments with Spack
run: $SPACK_ROOT/bin/spack install py-pygments
- name: Load py-pygments with Spack and test import
run: cd $SPACK_ROOT && . share/spack/setup-env.sh && spack load py-pygments && python -c 'import pygments;'
- name: Check if the last command succeeded
run: echo "pygments import succeeded"
if: success()
# Test flask installation
- name: Remove flask and dependency jinja2
run: |
rm -rd $SPACK_PKGS/py-flask || true
rm -rd $SPACK_PKGS/py-jinja2 || true
- name: Run py2spack conversion
run: py2spack --versions-per-package 5 --max-conversions 2 flask
- name: Install py-flask with Spack
run: $SPACK_ROOT/bin/spack install py-flask
- name: Load py-flask with Spack and test import
run: cd $SPACK_ROOT && . share/spack/setup-env.sh && spack load py-flask && python -c 'import flask;'
- name: Check if the last command succeeded
run: echo "flask import succeeded"
if: success()