generated from aboutcode-org/skeleton
-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (43 loc) · 1.36 KB
/
main.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
name: run tests
on: [push, pull_request]
env:
FEDERATEDCODE_HOST: 127.0.0.1
FEDERATEDCODE_PORT: 8000
FEDERATEDCODE_DOMAIN: 127.0.0.1:8000
POSTGRES_HOST: 127.0.0.1
POSTGRES_DB: federatedcode
POSTGRES_USER: federatedcode
POSTGRES_PASSWORD: federatedcode
jobs:
build:
runs-on: ubuntu-20.04
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: ${{ env.POSTGRES_DB }}
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
ports:
- 5432:5432
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: make dev
- name: Run tests
run: make envfile && make test
env:
GH_TOKEN: 1
FEDERATEDCODE_HOST: ${{ env.FEDERATEDCODE_HOST }}
FEDERATEDCODE_PORT: ${{ env.FEDERATEDCODE_PORT }}
FEDERATEDCODE_DOMAIN: ${{ env.FEDERATEDCODE_DOMAIN }}
POSTGRES_HOST: ${{ env.POSTGRES_HOST }}
POSTGRES_DB: ${{ env.POSTGRES_DB }}
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
POSTGRES_PORT: ${{ env.POSTGRES_PORT }}