Workaround for dynamics.minimise() thread safety issue. #242
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: Build and test | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "**" | |
pull_request: | |
branches: | |
- "main" | |
jobs: | |
pre_job: | |
runs-on: ubuntu-latest | |
outputs: | |
should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
steps: | |
- id: skip_check | |
uses: fkirc/skip-duplicate-actions@v5 | |
with: | |
concurrent_skipping: 'same_content_newer' | |
build: | |
needs: pre_job | |
if: needs.pre_job.outputs.should_skip != 'true' | |
name: build (${{ matrix.python-version }}, ${{ matrix.platform.name }}) | |
runs-on: ${{ matrix.platform.os }} | |
strategy: | |
max-parallel: 9 | |
fail-fast: false | |
matrix: | |
python-version: ["3.11"] | |
platform: | |
#- { name: "windows", os: "windows-latest", shell: "pwsh" } | |
- { name: "linux", os: "ubuntu-latest", shell: "bash -l {0}" } | |
- { name: "macos", os: "macos-latest", shell: "bash -l {0}" } | |
defaults: | |
run: | |
shell: ${{ matrix.platform.shell }} | |
steps: | |
# | |
- name: Checkout the repository (commit) | |
uses: actions/checkout@v4 | |
if: github.event_name != 'pull_request' | |
# | |
- name: Checkout the repository (PR) | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
if: github.event_name == 'pull_request' | |
# | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
activate-environment: somd2 | |
environment-file: environment.yaml | |
miniforge-version: latest | |
run-post: ${{ matrix.platform.name != 'windows' }} | |
# | |
- name: Install pytest | |
run: conda install pytest | |
# | |
- name: Install the package | |
run: pip install . | |
# | |
- name: Run the tests | |
run: python -m pytest -svvv --color=yes tests |