Skip to content

Commit

Permalink
Add GitHub Actions for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
c-bata committed Aug 31, 2023
1 parent b57710b commit f8c5f94
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: tests
on:
pull_request:
branches:
- main
paths:
- '.github/workflows/tests.yml'
- '**.py'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: x64
- name: Install dependencies
run: |
python -m pip install --progress-bar off --upgrade pip setuptools
pip install --progress-bar off .
pip install --progress-bar off flake8 black isort
- run: flake8 . --show-source
- run: black --check --diff .
- run: isort --check --diff .
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- name: Setup Python${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install dependencies
run: |
python -m pip install --progress-bar off --upgrade pip setuptools
pip install --progress-bar off .
pip install -r requirements.txt
- run: pytest tests

0 comments on commit f8c5f94

Please sign in to comment.