-
Notifications
You must be signed in to change notification settings - Fork 97
42 lines (41 loc) · 1.18 KB
/
pr_validation.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
name: "PR validation"
on:
pull_request:
types: [opened, reopened]
push:
branches-ignore:
- staging
- main
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: pipenv
- name: Install Pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- name: Install Dependencies
run: pipenv install --dev
- name: Run migrations
run: pipenv run python manage.py quicksetup --noindex
- name: Run Tests
run: |
pipenv run python manage.py runserver 0.0.0.0:8000 &
sleep 5 &&
pipenv run pytest
- name: Validate Data
run: |
pipenv run python ./scripts/data_test.py --dir ./data/v2
build:
runs-on: ubuntu-latest
steps:
- name: Sanitize branch name
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF##*/} | tr '/' '-')" >> $GITHUB_ENV
- name: Build Docker image
uses: docker/build-push-action@v4
with:
push: false
tags: open5e-api:${{ env.BRANCH_NAME }}