forked from mxcube/mxcubecore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use conda environments for better consistency
- Loading branch information
1 parent
b3a3cf4
commit d596812
Showing
5 changed files
with
46 additions
and
64 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,19 @@ | ||
name: Linting & Code Quality | ||
name: Pre-commit hooks | ||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# Python 3.8 because we want lowest supported version for syntax checks (format, lint) | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.8" | ||
|
||
- name: Install openldap | ||
run: | | ||
sudo apt-get update && sudo apt-get upgrade -y | ||
sudo apt-get install -y libldap2-dev libsasl2-dev slapd ldap-utils tox lcov valgrind | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install poetry --user | ||
python -m poetry install | ||
- name: Run Pre-Commit | ||
run: | | ||
poetry run pre-commit run --all-files | ||
- name: Run pre-commit hooks | ||
uses: pre-commit/[email protected] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,31 @@ | ||
name: Pytest | ||
on: | ||
pull_request: | ||
paths-ignore: | ||
- "doc/**" | ||
- "docs/**" | ||
types: [opened, reopened, synchronize] | ||
paths: | ||
- '**.py' | ||
jobs: | ||
Python: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
python-version: ["3.8", "3.9", "3.10"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
- name: Setup conda environment with micromamba for Python ${{ matrix.python-version }} | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install openldap | ||
run: sudo apt-get update && sudo apt-get install -y libldap2-dev libsasl2-dev slapd ldap-utils tox lcov valgrind | ||
cache-environment: true | ||
create-args: >- | ||
python=${{ matrix.python-version }} | ||
environment-file: conda-environment-dev.yml | ||
post-cleanup: all | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install poetry --user | ||
python -m poetry install --extras=tango | ||
run: "${MAMBA_EXE} run --name mxcubecore poetry install --extras=tango --only=dev,main" | ||
|
||
- name: Test with pytest | ||
run: | | ||
python -m poetry run pytest --no-cov | ||
run: "${MAMBA_EXE} run --name mxcubecore pytest --no-cov" |
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