Skip to content

Commit

Permalink
Add CI workflow files
Browse files Browse the repository at this point in the history
  • Loading branch information
mdpiper committed Dec 12, 2023
1 parent 3c50744 commit 7c76604
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Format

on: [push, pull_request]

jobs:

format:

if:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: psf/black@stable
with:
args: ". --check"
21 changes: 21 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lint

on: [push, pull_request]

jobs:

lint:

if:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4

- name: Lint
run: |
pip install flake8
flake8 .
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test

on: [push, pull_request]

jobs:
build-and-test:

if:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository

runs-on: ${{ matrix.os }}

defaults:
run:
shell: bash -l {0}

strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9"]

steps:
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
miniforge-variant: Miniforge3
miniforge-version: latest
auto-update-conda: true

- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Install package
run: |
pip install -e .
- name: Test
run: |
pytest -vvv

0 comments on commit 7c76604

Please sign in to comment.