Skip to content

expiriment with env variables #12

expiriment with env variables

expiriment with env variables #12

Workflow file for this run

name: CodeCov
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
name: Test OneSilaHeadless
services:
postgres:
image: postgres:12
env:
POSTGRES_USER: fake
POSTGRES_PASSWORD: fake
POSTGRES_DB: fake
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install requirements
run: pip install -r requirements.txt
- name: Install OS dependencies
run: sudo apt-get install postgresql
- name: Run tests and collect coverage
env:
POSTGRES_HOST: postgres
POSTGRES_USER: fake
POSTGRES_PASSWORD: fake
POSTGRES_DB: fake
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }}
run: cd OneSila && coverage run --source='.' manage.py test
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}