Skip to content

Commit 9f57e0f

Browse files
authored
Add github action to run unittests (eth-cscs#51)
1 parent c6ecd96 commit 9f57e0f

30 files changed

+25
-5
lines changed

Diff for: .github/main.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Stackinator CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
unittest:
7+
runs-on: ubuntu-20.04
8+
strategy:
9+
matrix:
10+
python-version: ['3.6']
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Set up Python ${{ matrix.python-version }}
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: ${{ matrix.python-version }}
17+
- name: Bootstrap
18+
run: |
19+
./bootstrap.sh
20+
- name: Generic Unittests
21+
run: |
22+
./test_stackinator.py

Diff for: requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PyYAML
21
Jinja2
32
jsonschema
43
pytest
4+
PyYAML

Diff for: test.py renamed to test_stackinator.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
import pathlib
44
import sys
55

6+
67
prefix = pathlib.Path(__file__).parent.resolve()
78
external = prefix / 'external'
89
sys.path = [prefix.as_posix(), external.as_posix()] + sys.path
910

1011
import pytest
1112

1213
if __name__ == '__main__':
13-
sys.argv = [sys.argv[0], '-vv', 'test']
14+
sys.argv = [sys.argv[0], '-vv', 'unittests']
1415
sys.exit(pytest.main())
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: test/test_schema.py renamed to unittests/test_schema.py

-3
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,3 @@ def test_recipe_environments_yaml(yaml_path, recipe_paths):
117117
with open(p / 'environments.yaml') as fid:
118118
raw = yaml.load(fid, Loader=yaml.Loader)
119119
schema.validator(schema.environments_schema).validate(raw)
120-
121-
122-
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)