Skip to content

Update envfile_testing Make command #520 #1790

Update envfile_testing Make command #520

Update envfile_testing Make command #520 #1790

Workflow file for this run

name: PurlDB Tests CI
on: [push, pull_request]
env:
POSTGRES_DB: packagedb
POSTGRES_USER: packagedb
POSTGRES_PASSWORD: packagedb
POSTGRES_INITDB_ARGS: --encoding=UTF-8 --lc-collate=en_US.UTF-8 --lc-ctype=en_US.UTF-8
jobs:
build:
runs-on: ubuntu-20.04
services:
postgres1:
image: postgres:13
env:
POSTGRES_DB: ${{ env.POSTGRES_DB }}
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
POSTGRES_INITDB_ARGS: ${{ env.POSTGRES_INITDB_ARGS }}
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
postgres2:
image: postgres:13
env:
POSTGRES_DB: matchcodeio
POSTGRES_USER: matchcodeio
POSTGRES_PASSWORD: matchcodeio
POSTGRES_INITDB_ARGS: ${{ env.POSTGRES_INITDB_ARGS }}
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5433:5432
strategy:
max-parallel: 4
matrix:
python-version: ["3.10", "3.11"]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
working-directory: .
run: |
make dev
- name: Run tests
working-directory: .
run: |
make envfile_testing
sudo mkdir /etc/scancodeio
sudo cp .env /etc/scancodeio
make test