Skip to content

Commit bad6ac5

Browse files
committed
modified workflows
1 parent 5ce416b commit bad6ac5

File tree

2 files changed

+48
-49
lines changed

2 files changed

+48
-49
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,31 @@ jobs:
88
strategy:
99
matrix:
1010
os: [ubuntu-latest, windows-latest, macos-12]
11-
python-version: ["3.8", "3.9", "3.10", "3.11"]
11+
python-version: ["3.9", "3.10", "3.11"]
1212

1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v4
1515

16-
- name: Set up Python
17-
uses: actions/setup-python@v5
18-
with:
19-
python-version: ${{ matrix.python-version }}
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: ${{ matrix.python-version }}
2020

21-
- name: Install Python dependencies
22-
run: |
23-
python3 -m pip install --upgrade pip
24-
python3 -m pip install numpy scipy matplotlib pytest pytest-cov
25-
26-
- name: Test with pytest
27-
env:
28-
CODACY_API_TOKEN: ${{ secrets.CODACY_API_TOKEN }}
29-
run: |
30-
if [ -z "$CODACY_API_TOKEN" ]
31-
then
32-
python3 -m pytest
33-
else
34-
python3 -m pytest --cov-report term --cov-report xml:cobertura.xml --cov=pygem
35-
curl -s https://coverage.codacy.com/get.sh -o CodacyCoverageReporter.sh
36-
chmod +x CodacyCoverageReporter.sh
37-
./CodacyCoverageReporter.sh report -r cobertura.xml -t $CODACY_API_TOKEN
38-
fi
21+
- name: Install Python dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
python -m pip install numpy scipy matplotlib pytest pytest-cov
3925
26+
- name: Run tests with pytest
27+
env:
28+
CODACY_API_TOKEN: ${{ secrets.CODACY_API_TOKEN }}
29+
run: |
30+
if [ -z "$CODACY_API_TOKEN" ]
31+
then
32+
python -m pytest
33+
else
34+
python -m pytest --cov-report term --cov-report xml:cobertura.xml --cov=pygem
35+
curl -s https://coverage.codacy.com/get.sh -o CodacyCoverageReporter.sh
36+
chmod +x CodacyCoverageReporter.sh
37+
./CodacyCoverageReporter.sh report -r cobertura.xml -t $CODACY_API_TOKEN
38+
fi

.github/workflows/testing_pr.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,39 @@ on:
55
branches:
66
- "master"
77

8-
98
jobs:
109
build:
1110
runs-on: ${{ matrix.os }}
1211
strategy:
1312
fail-fast: false
1413
matrix:
15-
os: [windows-latest, macos-latest, ubuntu-latest]
16-
python-version: [3.7, 3.8]
17-
14+
os: [windows-latest, macos-12, ubuntu-latest]
15+
python-version: ["3.9", "3.10", "3.11"]
16+
1817
steps:
19-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
2019

20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
2124

22-
- name: Set up Python
23-
uses: actions/setup-python@v2
24-
with:
25-
python-version: ${{ matrix.python-version }}
25+
- name: Setup Conda
26+
if: matrix.os == 'macos-12' || matrix.os == 'ubuntu-latest'
27+
uses: s-weigand/setup-conda@v1
28+
with:
29+
auto-update-conda: true
30+
conda-channels: conda-forge
2631

27-
- name: Setup conda
28-
uses: s-weigand/setup-conda@v1
29-
with:
30-
update-conda: true
31-
python-version: ${{ matrix.python-version }}
32-
conda-channels: anaconda, conda-forge
33-
34-
- name: Install Python dependencies
35-
run: |
36-
conda install --yes pythonocc-core=7.4.0
37-
python3 -m pip install --upgrade pip
38-
python3 -m pip install smithers[vtk]
39-
python3 -m pip install .[test]
32+
- name: Install Python dependencies
33+
run: |
34+
if [[ "${{ matrix.os }}" == "macos-12" || "${{ matrix.os }}" == "ubuntu-latest" ]]; then
35+
conda install --yes pythonocc-core=7.4.0
36+
fi
37+
python -m pip install --upgrade pip
38+
python -m pip install smithers[vtk]
39+
python -m pip install .[test]
4040
41-
- name: Test with pytest
42-
run: |
43-
python3 -m pytest
41+
- name: Run tests with pytest
42+
run: |
43+
python -m pytest

0 commit comments

Comments
 (0)