Skip to content

Commit

Permalink
adds lint-and-format.yaml and tests.yaml workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelteixeiraa committed Dec 8, 2023
1 parent 8952362 commit 89cef0f
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/lint-and-format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Lint and Format

on:
push:
branches:
- "*"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint-and-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.7
virtualenvs-create: false
- name: Install dependencies
run: poetry install
- name: Run Format check
run: poetry run ruff format --check
- name: Run Lint
run: poetry run ruff check
29 changes: 29 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Run Tests

on:
push:
branches:
- "*"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.7
virtualenvs-create: false
- name: Install dependencies
run: poetry install
- name: Run Format check
run: poetry run pytest

0 comments on commit 89cef0f

Please sign in to comment.