Skip to content

Commit

Permalink
Update GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
entorb committed Apr 3, 2024
1 parent aadad03 commit bd79b2e
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/test-python-app.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand Down

0 comments on commit bd79b2e

Please sign in to comment.