forked from alan-turing-institute/sqlsynthgen
-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (38 loc) · 986 Bytes
/
tests.yml
File metadata and controls
38 lines (38 loc) · 986 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
name: unit test action
on:
pull_request:
# Run on merge to main because caches are inherited from parent branches
push:
branches:
- main
env:
# This should be the default but we'll be explicit
PYTHON_VERSION: "3.10"
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Start PostgreSQL
shell: bash
run: |
sudo systemctl start postgresql.service
- name: Install poetry
shell: bash
run: |
sudo apt install python3-poetry
- name: Configure poetry
shell: bash
run: |
python -m poetry config virtualenvs.in-project true
- name: Install dependencies
shell: bash
if: steps.poetry-cache.outputs.cache-hit != 'true'
run: |
python -m poetry install --all-extras
- name: Run tests
shell: bash
run: |
poetry run python -m unittest