diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d3090038f..3e85dd56d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,8 +3,6 @@ name: CI on: push: - branches: - - "master" pull_request: branches: - "master" @@ -21,6 +19,9 @@ jobs: matrix: os: [macOS-latest, ubuntu-latest] python-version: [3.7, 3.8] + defaults: + run: + shell: bash -el {0} env: CI_OS: ${{ matrix.os }} PYVER: ${{ matrix.python-version }} @@ -30,38 +31,35 @@ jobs: - uses: actions/checkout@v3 - name: Additional info about the build - shell: bash run: | uname -a df -h ulimit -a - - uses: conda-incubator/setup-miniconda@v2 + - name: Miniconda Setup + uses: conda-incubator/setup-miniconda@v3 with: - python-version: ${{ matrix.python-version }} - miniforge-variant: Mambaforge miniforge-version: latest - activate-environment: test - environment-file: devtools/conda-envs/test_env.yaml + auto-update-conda: true + conda-build-version: '>=25.1' channels: conda-forge,defaults,bioconda + environment-file: devtools/conda-envs/test_env.yaml + python-version: ${{ matrix.python-version }} + activate-environment: test # TODO: Remove this step when patched theseus makes it to CF - name: Build patched mmligner - shell: bash -l {0} run: | conda activate base - conda install conda-build conda build devtools/conda-recipes/mmligner/ - name: Install package - shell: bash -l {0} run: | conda install -c local mmligner pip python -m pip install . --no-deps conda list - name: Run tests - shell: bash -l {0} run: | pytest -v --cov=${PACKAGE} --cov-report=xml --color=yes ${PACKAGE}/tests/ @@ -76,6 +74,9 @@ jobs: ############# lint-format: runs-on: ubuntu-latest + defaults: + run: + shell: bash -el {0} env: CI_OS: ubuntu-latest PACKAGE: "opencadd" @@ -85,27 +86,26 @@ jobs: - name: Checkout the code uses: actions/checkout@v3 - - uses: conda-incubator/setup-miniconda@v2 + - name: Miniconda Setup + uses: conda-incubator/setup-miniconda@v3 with: - python-version: "3.8" - miniforge-variant: Mambaforge miniforge-version: latest - activate-environment: test - environment-file: devtools/conda-envs/test_env.yaml + auto-update-conda: true + conda-build-version: '>=25.1' channels: conda-forge,defaults,bioconda + environment-file: devtools/conda-envs/test_env.yaml + python-version: 3.8 + activate-environment: test - name: Install linter and formatter - shell: bash -l {0} run: | conda install -y pylint black - name: Run pylint - shell: bash -l {0} run: | pylint $PACKAGE/ - name: Run black check - shell: bash -l {0} if: always() run: | black --check -l 99 $PACKAGE/ diff --git a/.gitignore b/.gitignore index 8ae7018ef..34b4390c8 100644 --- a/.gitignore +++ b/.gitignore @@ -103,4 +103,10 @@ ENV/ .mypy_cache/ # VSCode -.vscode/ \ No newline at end of file +.vscode/ + +# PyCharm +.idea/ + +# MacOS +.DS_Store