Skip to content

Fix file mode

Fix file mode #2

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: write
jobs:
test-yafs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
version: ${{ vars.POETRY_VERSION }}
- name: Install Poe
run: |
pipx install poethepoet
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: yafs/.venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('./yafs/poetry.lock') }}
- name: Install dependencies
working-directory: ./yafs
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install project
working-directory: ./yafs
run: |
poe configure
poetry install --no-interaction
- name: Run tests
working-directory: ./yafs
run: |
source .venv/bin/activate
poe manage migrate
poe test-full
- name: Run lint
working-directory: ./yafs
run: |
source .venv/bin/activate
poe lint
dependabot:
name: "Dependabot"
needs: [test-yafs]
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}