Skip to content

initial create table refactoring/modularization #18

initial create table refactoring/modularization

initial create table refactoring/modularization #18

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:

Check failure on line 12 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

You have an error in your yaml syntax on line 12
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: ${{ secrets.POSTGRES_DB }}
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: myenv
environment-file: environment.yml
python-version: 3.8
auto-activate-base: false
- name: Cache Conda dependencies
uses: actions/cache@v2
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ hashFiles('**/environment.yml') }}
restore-keys: |
${{ runner.os }}-conda-
- name: Install Conda dependencies
run: |
conda env create -f environment.yml
source activate my-env
- name: Run migrations
env:
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
POSTGRES_DB: ${{ secrets.POSTGRES_DB }}
run: |
psql -h $POSTGRES_HOST -U $POSTGRES_USER -d $POSTGRES_DB -a -f /home/prometheus/versus_rex/postgresql/migrations/v1_11-05-23_migrations_script.py
- name: Run tests
env:
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
POSTGRES_DB: ${{ secrets.POSTGRES_DB }}
run: |
# Run your test scripts here, for example:
pytest