Skip to content

Commit 9dc6790

Browse files
committed
CI/CD - try to avoid using conda when setting up environment
Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
1 parent 11a7a0a commit 9dc6790

2 files changed

Lines changed: 103 additions & 0 deletions

File tree

‎.github/workflows/ci-new.yml‎

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: CI (pip)
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
static_analysis:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v7
11+
- uses: actions/setup-python@v6
12+
with:
13+
python-version: "3.12"
14+
- name: Install dependencies
15+
run: python -m pip install --group dev -e .
16+
#- name: bandit
17+
#run: bandit -lll ipsframework/*.py
18+
- name: ruff-lint
19+
run: ruff check
20+
- name: ruff-format
21+
run: ruff format --check
22+
- name: codespell
23+
run: codespell || true
24+
25+
tests:
26+
runs-on: ${{ matrix.os }}
27+
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
include:
32+
- os: ubuntu-latest
33+
python-version: "3.11"
34+
- os: ubuntu-latest
35+
python-version: "3.12"
36+
- os: ubuntu-latest
37+
python-version: "3.13"
38+
- os: ubuntu-latest
39+
python-version: "3.14"
40+
- os: macos-latest
41+
python-version: "3.12"
42+
43+
steps:
44+
- uses: actions/checkout@v7
45+
- uses: actions/setup-python@v6
46+
with:
47+
python-version: ${{ matrix.python-version }}
48+
- name: Install OpenMPI (Linux)
49+
if: ${{ startsWith(matrix.os, 'ubuntu') }}
50+
run: |
51+
sudo apt-get update
52+
sudo apt-get install -y openmpi-bin libopenmpi-dev
53+
- name: Install OpenMPI (macOS)
54+
if: ${{ startsWith(matrix.os, 'macos') }}
55+
run: brew install open-mpi
56+
- name: Install IPS (in develop mode)
57+
run: python -m pip install --group dev -e .
58+
- name: testing running IPS (--help)
59+
run: ips.py --help
60+
- name: testing showing IPS version (--version)
61+
run: ips.py --version
62+
- name: Test with pytest
63+
run: python -m pytest --cov --cov-report=xml --cov-report=term --timeout=60
64+
# TODO: remove when tests are fixed
65+
continue-on-error: true
66+
- name: Upload coverage to Codecov
67+
uses: codecov/codecov-action@v4
68+
if: ${{ github.ref == 'refs/heads/main' }}
69+
70+
tests-wsl:
71+
runs-on: windows-latest
72+
73+
defaults:
74+
run:
75+
shell: wsl-bash {0}
76+
77+
steps:
78+
- uses: actions/checkout@v7
79+
- uses: Vampire/setup-wsl@v7
80+
with:
81+
additional-packages:
82+
python-is-python3
83+
python3-pip
84+
python3-venv
85+
openmpi-bin
86+
libopenmpi-dev
87+
# python3-pytest-cov
88+
# python3-pytest-timeout
89+
# python3-psutil
90+
- name: setup VENV for IPS
91+
run: |
92+
python -m venv .venv
93+
source .venv/bin/activate
94+
python -m pip install --group dev -e .
95+
- name: testing running IPS (--help)
96+
run: ips.py --help
97+
- name: testing showing IPS version (--version)
98+
run: ips.py --version
99+
- name: Test with pytest
100+
run: python -m pytest --cov --timeout=60
101+
# TODO: remove when tests are fixed
102+
continue-on-error: true

‎pyproject.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ dependencies = [
5353
[dependency-groups]
5454
dev = [
5555
"codespell>=2.4.1",
56+
"flask",
5657
"mypy>=1.15.0",
5758
"pre-commit>=4.2.0",
5859
"pytest>=9.0.3",

0 commit comments

Comments
 (0)