Skip to content

Commit

Permalink
add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumjot committed Nov 15, 2023
1 parent d831041 commit 540b87f
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Linting

on:
push:
branches:
- main
pull_request:

jobs:
linting:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3

- name: Cache pre-commit
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}

- name: Set up python
uses: actions/setup-python@v4
with:
python-version: "3.x"
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: Install dependencies
run: |-
python -m pip install pre-commit
pre-commit install
- name: Run pre-commit
run: pre-commit run --all-files --color always
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test

on:
push:
branches:
- main
pull_request:
paths-ignore:
- "**.md"
- "**.rst"

jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3

- name: Set up python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
- name: Install umetrics
run: |
pip install -e .
- name: Run tests
run: |
pytest

0 comments on commit 540b87f

Please sign in to comment.