Skip to content

Commit

Permalink
ci: add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pirhoo committed Jan 17, 2024
1 parent efff690 commit 77f10d4
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Prophecies - CI

on:
push:

concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
test-backend:
runs-on: ubuntu-latest
strategy:
max-parallel: 2
matrix:
python-version: ['3.9', '3.10']
steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}

- name: Install Python dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root

- name: Build PLD
run: poetry build

- name: Run the tests with pytest
run: make test-back

0 comments on commit 77f10d4

Please sign in to comment.