name: Test
runs-on: ubuntu-latest
steps:
- - name: Checkout
- uses: actions/checkout@v4
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Set up Python
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.x'
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install .
+
+ - name: Test with pytest
+ run: |
+ pip install pytest
+ pip install pytest-cov
+ python -m pytest tests --junit-xml pytest.xml
+
+ - name: Lint with flake8
+ run: |
+ pip install flake8
+ flake8 --ignore=E741,E501 .
+
+ - name: Upload Unit Test Results
+ if: always()
+ uses: actions/upload-artifact@v4
+ with:
+ name: Unit Test Results
+ path: pytest.xml
- - name: Set up Python
- uses: actions/setup-python@v5
- with:
- python-version: "3.x"
-
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip
- pip install .
-
- - name: Test with pytest
- run: |
- pip install pytest
- pip install pytest-cov
- python -m pytest tests --junit-xml pytest.xml
-
- - name: Lint with flake8
- run: |
- pip install flake8
- flake8 --ignore=E741,E501 .
-
- - name: Upload Unit Test Results
- if: always()
- uses: actions/upload-artifact@v4
- with:
- name: Unit Test Results
- path: pytest.xml
publish-test-results:
name: "Publish Unit Tests Results"