diff --git a/.github/workflows/black.yaml b/.github/workflows/black.yaml new file mode 100644 index 0000000..60f8aa6 --- /dev/null +++ b/.github/workflows/black.yaml @@ -0,0 +1,19 @@ +name: black + +on: [pull_request] + +jobs: + linter: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.11 + uses: actions/setup-python@v3 + with: + python-version: '3.11' + - name: Install black + run: | + python -m pip install --upgrade pip + pip install black + - name: Analysing the code with black + run: black --check $(git ls-files '*.py') diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml new file mode 100644 index 0000000..770ce33 --- /dev/null +++ b/.github/workflows/flake8.yml @@ -0,0 +1,19 @@ +name: flake8 + +on: [pull_request] + +jobs: + linter: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.11 + uses: actions/setup-python@v3 + with: + python-version: '3.11' + - name: Install flake8 + run: | + python -m pip install --upgrade pip + pip install flake8 + - name: Analysing the code with flake8 + run: flake8 --select=W504 --ignore=E203,W503 --max-line-length=120 $(git ls-files '*.py') diff --git a/.github/workflows/reuse.yaml b/.github/workflows/reuse.yaml new file mode 100644 index 0000000..529afef --- /dev/null +++ b/.github/workflows/reuse.yaml @@ -0,0 +1,19 @@ +name: reuse + +on: [pull_request] + +jobs: + linter: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.11 + uses: actions/setup-python@v3 + with: + python-version: '3.11' + - name: Install reuse + run: | + python -m pip install --upgrade pip + pip install reuse + - name: Analysing the code with reuse + run: reuse lint diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml new file mode 100644 index 0000000..3c4134f --- /dev/null +++ b/.github/workflows/unittests.yaml @@ -0,0 +1,20 @@ +name: Unit Tests Transformer + +on: [pull_request] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.11 + uses: actions/setup-python@v3 + with: + python-version: '3.11' + - name: Install black + run: | + python3 -m pip install --upgrade pip + pip3 install -r requirements.txt + pip3 install . + - name: Run unit tests + run: python -m unittest Tests/TestTransformer.py