Skip to content

Commit a410f10

Browse files
committed
next try
1 parent 3fe2edb commit a410f10

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

.github/workflows/pre-commit.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,18 @@ jobs:
2020
uses: actions/setup-python@v2
2121
with:
2222
python-version: 3.10.8
23+
- name: Install Poetry
24+
run: |
25+
curl -sSL https://install.python-poetry.org | python3 -
26+
- name: Configure Poetry to use the right Python version
27+
run: |
28+
poetry env use python3.10 # Adjust the Python version if necessary
2329
- name: Install dependencies with Poetry
2430
run: |
2531
poetry install
2632
- name: Install pre-commit hooks
2733
run: |
28-
poetry run pre-commit install
34+
poetry run pre-commit install-hooks
2935
- name: Run pre-commit hooks
3036
run: |
3137
poetry run pre-commit run --all-files

jenkins/mergerequest

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,29 @@ pipeline {
66
}
77

88
stages {
9+
10+
stage('Install Poetry') {
11+
steps {
12+
// Install Poetry inside the Docker container
13+
sh 'curl -sSL https://install.python-poetry.org | python3 -'
14+
}
15+
}
16+
stage('Install Dependencies') {
17+
steps {
18+
// Install dependencies using Poetry inside the Docker container
19+
sh 'poetry install'
20+
}
21+
}
22+
stage('Set up environment') {
23+
steps {
24+
// Run setup_env.py to set up the environment (e.g., .env file)
25+
sh 'python3 setup_env.py'
26+
}
27+
}
28+
929
stage('Pytest') {
1030
steps {
1131
sh'''
12-
source $SCRATCH/project/icon/probtest/conda/miniconda/bin/activate probtest
1332
pytest -v tests/*
1433
'''
1534
}

0 commit comments

Comments
 (0)