Skip to content

Commit d25d7f8

Browse files
committed
Add test workflow
1 parent d0c2aa8 commit d25d7f8

File tree

1 file changed

+105
-0
lines changed

1 file changed

+105
-0
lines changed

.github/workflows/main.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: h5pyd CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches: [master]
7+
8+
env:
9+
ADMIN_PASSWORD: admin
10+
ADMIN_USERNAME: admin
11+
USER_NAME: test_user1
12+
USER_PASSWORD: test
13+
USER2_NAME: test_user2
14+
USER2_PASSWORD: test
15+
HSDS_USERNAME: test_user1
16+
HSDS_PASSWORD: test
17+
HSDS_PATH: /home/test_user1/
18+
HSDS_ENDPOINT: http+unix://%2Ftmp%2Fhs%2Fsn_1.sock
19+
HDF5_VOL_CONNECTOR: REST
20+
ROOT_DIR: ${{github.workspace}}/hsds/hsds_root
21+
BUCKET_NAME: hsds_bucket
22+
HS_ENDPOINT: http+unix://%2Ftmp%2Fhs%2Fsn_1.sock
23+
HS_USERNAME: test_user1
24+
HS_PASSWORD: test
25+
TEST2_USERNAME: test_user2
26+
TEST2_PASSWORD: test
27+
H5PYD_TEST_FOLDER: h5pyd_tests
28+
29+
jobs:
30+
build-and-test:
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
os: [ubuntu-latest,]
35+
python-version: ["3.10"] # ["3.8", "3.9", "3.10"]
36+
37+
runs-on: ${{ matrix.os }}
38+
steps:
39+
- uses: actions/checkout@v3
40+
41+
- name: Set up Python ${{ matrix.python-version }}
42+
uses: actions/setup-python@v3
43+
with:
44+
python-version: ${{ matrix.python-version }}
45+
46+
- name: Install dependencies
47+
shell: bash
48+
run: |
49+
python -m pip install --upgrade pip
50+
python -m pip install flake8 pytest
51+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
52+
53+
# - name: Lint with flake8
54+
# shell: bash
55+
# run: |
56+
# # stop the build if there are Python syntax errors or undefined names
57+
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
58+
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
59+
# flake8 . --count --max-complexity=10 --max-line-length=127 --statistics
60+
61+
- name: Install package
62+
shell: bash
63+
run: |
64+
pip install -e .
65+
66+
- name: Checkout HSDS
67+
uses: actions/checkout@v3
68+
with:
69+
repository: HDFGroup/hsds
70+
path: ${{github.workspace}}/hsds
71+
72+
- name: Install HSDS dependencies
73+
shell: bash
74+
run: |
75+
python -m pip install --upgrade pip
76+
python -m pip install pytest
77+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
78+
79+
- name: Install HSDS
80+
shell: bash
81+
run: |
82+
cd ${{github.workspace}}/hsds
83+
pip install -e .
84+
85+
- name: Start HSDS
86+
shell: bash
87+
run: |
88+
cd ${{github.workspace}}/hsds
89+
mkdir hsds_root
90+
mkdir hsds_root/hsds_bucket
91+
cp admin/config/groups.default admin/config/groups.txt
92+
cp admin/config/passwd.default admin/config/passwd.txt
93+
./runall.sh --no-docker 1 &
94+
sleep 11 # let the nodes get ready
95+
python tests/integ/setup_test.py
96+
97+
- name: Create h5pyd test folder
98+
shell: bash
99+
run: |
100+
hstouch -v /home/test_user1/h5pyd_tests
101+
102+
- name: Run h5pyd tests
103+
shell: bash
104+
run: |
105+
python testall.py

0 commit comments

Comments
 (0)