Multistages (#22) #149
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Commit check | |
on: [push] | |
jobs: | |
files-check: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
- name: Add dependencies | |
run: | | |
python -m pip install --upgrade pip | |
eval `ssh-agent -s` | |
echo "${{ secrets.TOKEN }}" | ssh-add - | |
pip install git+ssh://[email protected]/twiinIT/cosapp-fmu.git@master | |
ssh-add -D | |
pip install flake8 pytest | |
if [ -f requirements-ci.txt ]; then pip install -r requirements-ci.txt; fi | |
- name: Run precommit | |
run: | | |
pre-commit run --all-files | |
run-test: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up conda environment | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-name: test_env | |
create-args: >- | |
python= | |
omcompiler | |
pyoccad | |
init-shell: >- | |
bash | |
- name: Add pip dependencies | |
shell: bash -el {0} | |
run: | | |
micromamba activate test_env | |
python -m pip install --upgrade pip | |
eval `ssh-agent -s` | |
echo "${{ secrets.TOKEN }}" | ssh-add - | |
pip install git+ssh://[email protected]/twiinIT/cosapp-fmu.git@master | |
ssh-add -D | |
pip install flake8 pytest | |
if [ -f requirements-ci.txt ]; then pip install -r requirements-ci.txt; fi | |
- name: Test with pytest | |
shell: bash -el {0} | |
run: | | |
pytest |