-
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.
- Loading branch information
1 parent
4a41be9
commit cb04c71
Showing
2 changed files
with
59 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: black-action | ||
on: [push, pull_request] | ||
jobs: | ||
linter_name: | ||
name: runner / black formatter | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: rickstaa/action-black@v1 | ||
with: | ||
black_args: ". --check" | ||
fail_on_error: "False" |
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Python Tests | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
repository_dispatch: | ||
types: [ovito_update] | ||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 15 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ["3.7", "3.10", "3.11"] | ||
exclude: | ||
- os: macos-latest | ||
python-version: "3.7" | ||
- os: windows-latest | ||
python-version: "3.7" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install apt dependencies | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
sudo apt install -y libegl1 libegl1-mesa libegl-mesa0 libgl1-mesa-glx libopengl0 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
check-latest: true | ||
- name: Install python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install pytest | ||
python -m pip install --pre ovito | ||
python -m pip install . | ||
- name: Test with pytest | ||
run: | | ||
pytest |