Merge pull request #42 from animorphcoop/dedicated-prompt-act #110
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: [ development ] | |
pull_request: | |
branches: [ development ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgis/postgis:12-3.4-alpine | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- name: Setup Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.10.15 | |
- name: Install packages | |
run: sudo apt-get install -y redis-tools redis-server binutils libproj-dev gdal-bin | |
- name: Verify that redis is up | |
run: redis-cli ping | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Copy requirements files | |
run: | | |
mkdir -p ${GITHUB_WORKSPACE}/sfs/ | |
cp prod/requirements.txt ${GITHUB_WORKSPACE}/sfs/ | |
cp dev/requirements_dev.txt ${GITHUB_WORKSPACE}/sfs/ | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
cd sfs | |
pip install -r requirements.txt | |
pip install -r requirements_dev.txt | |
npm install && npm run build | |
- name: Create log directory with sudo | |
run: sudo mkdir -p /home/app/sfs/logs/ | |
- name: Run Tests | |
env: | |
POSTGRES_HOST: localhost | |
POSTGRES_DB: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
VITE_DEV_MODE: 0 | |
run: | | |
python manage.py migrate --no-input | |
python manage.py collectstatic --no-input | |
pytest tests |