diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index 944cd65..c9b3b22 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout Source Code uses: actions/checkout@v4 - - name: Set up Python + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: python-version: '3.12' diff --git a/.github/workflows/unittest.yaml b/.github/workflows/unittest.yaml deleted file mode 100644 index cfd3b31..0000000 --- a/.github/workflows/unittest.yaml +++ /dev/null @@ -1,47 +0,0 @@ -name: Unit Tests - -on: - pull_request_target: - push: - branches: - - 'main' - - 'dev' - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ['3.12'] - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - cache: 'pip' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - pip install pytest - - name: Run tests with pytest - run: | - pytest app/ | tee unittest.txt - - name: Show failed tests and summary - run: | - grep -E "FAILED|ERROR|[0-9]+ passed," unittest.txt - failed_count=$(grep -E "FAILED|ERROR" unittest.txt | wc -l) - if [[ "$failed_count" -gt 0 ]]; then - echo "$failed_count failed tests found! Task failed." - exit 1 - fi - - name: Upload test results - uses: actions/upload-artifact@v3 - with: - name: pytest-results-${{ matrix.python-version }} - path: ./unittest.txt - retention-days: 3 - if: ${{ always() }}