Skip to content

SamuelAndresPascal #132

SamuelAndresPascal

SamuelAndresPascal #132

Workflow file for this run

name: simpleunit
run-name: ${{ github.actor }}
on:
push:
branches:
- master
schedule:
- cron: '30 5 * * 0'
jobs:
envs:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: multienv
python-version: 3.12
auto-activate-base: false
- run: conda install -c cosmoloj multienv
- run: pyenvs lint
- working-directory: simpleunit
run: pyenvs deps
- uses: actions/upload-artifact@v4
with:
name: pylintrc-environments
path: pylintrc_*
retention-days: 1
- uses: actions/upload-artifact@v4
with:
name: conda-environments
path: simpleunit/environment_*
retention-days: 1
lint:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
needs: envs
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- run: mv conda-environments/* simpleunit/
- run: mv pylintrc-environments/* .
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: lint
environment-file: simpleunit/environment_lint.yml
python-version: 3.12
auto-activate-base: false
- run: |
conda --version
python --version
conda list
- working-directory: simpleunit
run: |
pip install .
pylint --rcfile=../pylintrc_src src
pylint --rcfile=../pylintrc_src demo/demo.py
lint-test:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
needs: envs
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- run: mv conda-environments/* simpleunit/
- run: mv pylintrc-environments/* .
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: lint_test
environment-file: simpleunit/environment_lint_test.yml
python-version: 3.12
auto-activate-base: false
- run: |
conda --version
python --version
conda list
- working-directory: simpleunit
run: |
pip install .
pylint --rcfile=../pylintrc_src test/test.py
pylint --rcfile=../pylintrc_src test/unit_simple_test.py
pylint --rcfile=../pylintrc_src test/unit_simple_operator_test.py
pylint --rcfile=../pylintrc_src test/unit_simple_built_in_test.py
test:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
needs: envs
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- run: mv conda-environments/* simpleunit/
- run: mv pylintrc-environments/* .
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
environment-file: simpleunit/environment_test.yml
python-version: 3.12
auto-activate-base: false
- run: |
conda --version
python --version
conda list
- working-directory: simpleunit
run: pip install .
- run: pytest --cov=simpleunit --junitxml=simpleunit/report.xml --cov-append simpleunit
- run: python simpleunit/test/test.py