Skip to content

Commit

Permalink
CI implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jozef Tran committed May 28, 2023
1 parent c93bae7 commit dd10566
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 2 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/jws2txt_actions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Python package

on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with ruff
run: |
# stop the build if there are Python syntax errors or undefined names
ruff --format=github --select=E9,F63,F7,F82 --target-version=py37 .
# default set of ruff rules with GitHub Annotations
ruff --format=github --target-version=py37 .
- name: Test with unittest
run: |
python -m unittest discover
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"python.testing.unittestArgs": [
"-v",
"-s",
"./tests",
"-p",
"*_test.py"
],
"python.testing.pytestEnabled": false,
"python.testing.unittestEnabled": true
}
1 change: 1 addition & 0 deletions jws2txt/helpers/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
}



def frange(start: float, stop: float = 0, step: float = 1.0):
"""Return evenly spaced number over specified range.
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
numpy
olefile-0.46
olefile~=0.46
Empty file added tests/__init__.py
Empty file.
1 change: 1 addition & 0 deletions tests/test_helpers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from unittest import TestCase

0 comments on commit dd10566

Please sign in to comment.