Skip to content

Commit 1c3669c

Browse files
committed
feat(github-action): add new ci.yaml to launch ci testing
* use latest syntax docker compose * refine cache folder
1 parent 4f40692 commit 1c3669c

File tree

2 files changed

+51
-2
lines changed

2 files changed

+51
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI Workflow
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
8+
jobs:
9+
test-on-linux:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
# python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
14+
py-version: ["3.10"]
15+
name: Linux - Python ${{ matrix.py-version }}
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: docker/setup-compose-action@v1
20+
21+
- name: Run tests in Docker
22+
run: |
23+
make test ${{ matrix.py-version}}
24+
25+
test-on-windows:
26+
runs-on: windows-latest
27+
strategy:
28+
matrix:
29+
# python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
30+
py-version: ["3.10"]
31+
name: Windows - Python ${{ matrix.py-version }}
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
- uses: ilammy/msvc-dev-cmd@v1 # Setup Visual Studio Developer Command Prompt
36+
- uses: actions/setup-python@v5
37+
with:
38+
python-version: ${{ matrix.py-version }}
39+
40+
- name: Install dependencies
41+
shell: powershell
42+
run: |
43+
python -m pip install --upgrade pip
44+
pip install -r tests/requirements.txt
45+
46+
- name: Run tests
47+
shell: powershell
48+
run: |
49+
pytest tests

bin/run-test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ TEST_VERBOSE=${TEST_VERBOSE:=""}
77

88

99
declare -xr REPO_ROOT=$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )
10-
declare -xr PIP_CACHE=${REPO_ROOT}/.pip-cache
10+
declare -xr PIP_CACHE=${REPO_ROOT}/.cache/pip
1111

1212
mkdir -p ${PIP_CACHE}
1313
cd "${REPO_ROOT}"
@@ -16,7 +16,7 @@ build() {
1616
ver=$1
1717
service="pye${ver}"
1818

19-
docker-compose -f docker-compose-test.yml build ${service}
19+
docker compose -f docker-compose-test.yml build ${service}
2020
}
2121

2222
run_test() {

0 commit comments

Comments
 (0)