Time series generators #448
This file contains hidden or 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: unit test action | |
| on: | |
| pull_request: | |
| # Run on merge to main because caches are inherited from parent branches | |
| push: | |
| branches: | |
| - main | |
| env: | |
| # This should be the default but we'll be explicit | |
| PYTHON_VERSION: "3.9" | |
| jobs: | |
| the_job: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:15 | |
| env: | |
| POSTGRES_PASSWORD: password | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Bootstrap poetry | |
| shell: bash | |
| run: | | |
| python -m ensurepip | |
| python -m pip install --upgrade pip | |
| python -m pip install poetry | |
| - name: Configure poetry | |
| shell: bash | |
| run: | | |
| python -m poetry config virtualenvs.in-project true | |
| # - name: Cache Poetry dependencies | |
| # uses: actions/cache@v3 | |
| # id: poetry-cache | |
| # with: | |
| # path: .venv | |
| # key: venv-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('poetry.lock') }} | |
| - name: Install dependencies | |
| shell: bash | |
| if: steps.poetry-cache.outputs.cache-hit != 'true' | |
| run: | | |
| python -m poetry install --all-extras | |
| - name: Create src database | |
| shell: bash | |
| run: | | |
| PGPASSWORD=password psql --host=localhost --username=postgres --set="ON_ERROR_STOP=1" --file=tests/examples/src.dump | |
| - name: Run Unit Tests | |
| shell: bash | |
| run: | | |
| REQUIRES_DB=1 poetry run python -m unittest discover --verbose tests |