Skip to content

Commit

Permalink
Using micromamba
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-oscarsson committed Oct 12, 2023
1 parent 2d960f4 commit a5d0e6c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
35 changes: 19 additions & 16 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and test
name: Lint and test

on: [push, pull_request]

Expand All @@ -8,7 +8,7 @@ jobs:
strategy:
max-parallel: 5
matrix:
python-version: ["3.10"] #, "3.9", "3.10"]
python-version: ["3.10"] #, "3.9", "3.10"]

# Skip `pull_request` runs on local PRs for which `push` runs are already triggered
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
Expand All @@ -35,20 +35,23 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install ldap dependencies

- name: Install LDAP dependencies
run: sudo apt-get -y install libsasl2-dev libldap2-dev libssl-dev
- name: Install dependencies
run: |
conda install -c conda-forge mamba
mamba env update --file conda-environment.yml --name base
python -m poetry install --with dev

- name: Set up Conda environment
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: "latest"
environment-file: conda-environment.yml
cache-environment: true
post-cleanup: "all"

- name: Install MXCuBE
run: python -m poetry install --with dev

- name: Linting & Code Quality
run: |
poetry run pre-commit run --all-files
run: poetry run pre-commit run --all-files

- name: Test with pytest
run: |
poetry run pytest
run: poetry run pytest
1 change: 0 additions & 1 deletion conda-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ dependencies:
- python >=3.8,<3.11
- openldap
- python-ldap=3.4.0
- pip
- poetry
- nodejs
- redis-server
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ bcrypt = "^4.0.1"

[tool.poetry.dev-dependencies]
myst-parser = "^2.0.0"
pylint = [ { version = "==2.13.9", python = "<=3.7.1" }, { version = "2.15.3", python = ">=3.8" } ]
pre-commit = "2.20.0"
pytest = "7.1.3"
pytest-cov = "4.0.0"
Expand Down

0 comments on commit a5d0e6c

Please sign in to comment.