diff --git a/.github/workflows/test-python-app.yml b/.github/workflows/test-python-app.yml index ad99881..283ba7f 100644 --- a/.github/workflows/test-python-app.yml +++ b/.github/workflows/test-python-app.yml @@ -1,7 +1,4 @@ -# This workflow will install Python dependencies, run tests and lint with a single version of Python -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: Test Python application +name: Check and Test Python Project on: workflow_dispatch: @@ -14,33 +11,37 @@ permissions: contents: read jobs: - build: - runs-on: ubuntu-latest + check: + runs-on: ubuntu-22.04 steps: - - name: Checkout repository - uses: actions/checkout@v3 + - name: checkout repository + uses: actions/checkout@v4 + with: + persist-credentials: false + fetch-depth: 1 # 0 if you want to push to repo - - name: Set up Python - uses: actions/setup-python@v4 + - name: python set up + uses: actions/setup-python@v5 with: python-version: "3.10" + cache: "pip" - - name: Set up Python cache - uses: actions/cache@v3 + - name: python cache set up + uses: actions/cache@v4 with: path: ${{ env.pythonLocation }} key: ${{ env.pythonLocation }}-py-cache - - name: Install dependencies + - name: install dependencies run: | python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Run pre-commit tests - uses: pre-commit/action@v3.0.0 + - name: run pre-commit hooks + uses: pre-commit/action@v3.0.1 - - name: Test with pytest + - name: run pytest run: | pip install pytest cp src/rememberthemilk.ini.example src/rememberthemilk.ini