Only create log folder if it doesn't exist #34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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: Python application | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.10" | |
| - name: astral-sh/setup-uv | |
| # You may pin to the exact commit or the version. | |
| # uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a | |
| uses: astral-sh/setup-uv@v5.1.0 | |
| with: | |
| # The version of uv to install | |
| #version: # optional, default is latest | |
| # The version of Python to set UV_PYTHON to | |
| python-version: 3.10.6 | |
| # The checksum of the uv version to install | |
| #checksum: # optional | |
| # Used to increase the rate limit when retrieving versions and downloading uv. | |
| #github-token: # optional, default is ${{ github.token }} | |
| # Enable caching of the uv cache | |
| #enable-cache: # optional, default is auto | |
| # Glob pattern to match files relative to the repository root to control the cache. | |
| #cache-dependency-glob: # optional, default is **/uv.lock **/requirements*.txt | |
| # Suffix for the cache key | |
| #cache-suffix: # optional | |
| # Local path to store the cache. | |
| #cache-local-path: # optional, default is | |
| # Prune cache before saving. | |
| #prune-cache: # optional, default is true | |
| # Ignore when nothing is found to cache. | |
| #ignore-nothing-to-cache: # optional, default is false | |
| # Custom path to set UV_TOOL_DIR to. | |
| #tool-dir: # optional | |
| # Custom path to set UV_TOOL_BIN_DIR to. | |
| #tool-bin-dir: # optional | |
| - name: Install Dependencies | |
| # Need to run lock or else it also tries to install Windows dependencies | |
| run: | | |
| uv lock | |
| uv sync | |
| - name: Test with pytest | |
| run: | | |
| uv run pytest tests | |
| - name: Lint with ruff | |
| run: | | |
| uv run ruff check |