forked from EESSI/software-layer
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 1.44 KB
/
tests_init.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
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: Tests for init scripts
on: [push, pull_request]
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.7, 3.8, 3.9, '3.10']
fail-fast: false
steps:
- name: checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: set up Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: ${{matrix.python}}
architecture: x64
- name: install Python packages
run: |
pip install archspec==0.2.2 pytest
- name: unit tests for eessi_software_subdir_for_host.py script
run:
pytest -v init/test.py
- name: test eessi_software_subdir_for_host.py script
env:
EESSI_X86_64: /tmp/EESSI/software/linux/x86_64
run: |
mkdir -p ${EESSI_X86_64}/intel/{pentium4,sandybridge,haswell,skylake_avx512} ${EESSI_X86_64}/generic
python3 ./init/eessi_software_subdir_for_host.py /tmp/EESSI > out.txt
grep '^x86_64/' out.txt
# check override via $EESSI_SOFTWARE_SUBDIR_OVERRIDE
export EESSI_SOFTWARE_SUBDIR_OVERRIDE=x86_64/intel/pentium4
python3 ./init/eessi_software_subdir_for_host.py /tmp/EESSI > out.txt
grep '^x86_64/intel/pentium4$' out.txt