Skip to content

Commit

Permalink
Add actions for lint and test
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerwooo committed Apr 16, 2024
1 parent 7b49d54 commit 6105aa4
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml → .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:

jobs:
pre-commit:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -18,7 +18,7 @@ jobs:
python-version: "3.12"
cache: "pip" # caching pip dependencies

- name: Setup deps
- name: Setup deps for linting
run: |
python -m pip install --upgrade pip
python -m pip install -e '.[dev]'
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: test

on:
pull_request:
push:
branches: [main]
workflow_dispatch:

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip" # caching pip dependencies

- name: Setup deps for tests
run: |
python -m pip install --upgrade pip
python -m pip install -e '.[test]'
- name: Test with pytest
run: |
pytest -v -s
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
[![image](https://img.shields.io/pypi/v/torch-featurelayer.svg)](https://pypi.python.org/pypi/torch-featurelayer)
[![image](https://img.shields.io/pypi/l/torch-featurelayer.svg)](https://pypi.python.org/pypi/torch-featurelayer)
[![image](https://img.shields.io/pypi/pyversions/torch-featurelayer.svg)](https://pypi.python.org/pypi/torch-featurelayer)
[![lint](https://github.com/spencerwooo/torch-featurelayer/actions/workflows/ci.yml/badge.svg)](https://github.com/spencerwooo/torch-featurelayer/actions/workflows/ci.yml)
[![lint](https://github.com/spencerwooo/torch-featurelayer/actions/workflows/lint.yml/badge.svg)](https://github.com/spencerwooo/torch-featurelayer/actions/workflows/lint.yml)
[![test](https://github.com/spencerwooo/torch-featurelayer/actions/workflows/test.yml/badge.svg)](https://github.com/spencerwooo/torch-featurelayer/actions/workflows/test.yml)

# torch-featurelayer

Expand Down

0 comments on commit 6105aa4

Please sign in to comment.