Skip to content

Commit

Permalink
Update test.yml (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
austinmw authored Nov 20, 2024
1 parent 4902e6b commit fd58824
Showing 1 changed file with 54 additions and 52 deletions.
106 changes: 54 additions & 52 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,69 @@
name: Test
name: test

on:
workflow_dispatch:
push:
branches:
- main
- master
- test-github-actions
pull_request:
workflow_dispatch:
push:
branches:
- main
- master
- test-github-actions
pull_request:

jobs:
test:
runs-on: ubuntu-latest
test:
name: test
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]

name: Python ${{ matrix.python-version }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.5.1
virtualenvs-create: true
virtualenvs-in-project: true

- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.5.1
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root --with test,dev,docs

- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root --with test,dev,docs
- name: Install project
run: poetry install --no-interaction --with test,dev,docs

- name: Install project
run: poetry install --no-interaction --with test,dev,docs
- name: Verify Git installation
run: git --version

- name: Verify Git installation
run: git --version
- name: Verify pre-commit installation
run: poetry run pre-commit --version

- name: Verify pre-commit installation
run: poetry run pre-commit --version
- name: Run pre-commit hooks
run: |
poetry run pre-commit install
poetry run pre-commit run --all-files
- name: Run pre-commit hooks
run: |
poetry run pre-commit install
poetry run pre-commit run --all-files
- name: Run tests
run: poetry run pytest
- name: Run tests
run: poetry run pytest
env:
PYTHONPATH: ${{ github.workspace }}

0 comments on commit fd58824

Please sign in to comment.