test: stablize tests running near 00:00 (#785) #276
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: Stage | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- dev | |
paths-ignore: | |
- ".github" | |
- ".vscode" | |
jobs: | |
stage: | |
runs-on: ubuntu-latest | |
environment: staging | |
name: Stage project | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Setup timezone | |
uses: zcong1993/[email protected] | |
with: | |
timezone: Asia/Jerusalem | |
- name: Setup Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Cache pip repository | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
- name: Prepare python environment | |
run: | | |
pip install -r requirements.txt | |
poetry config virtualenvs.create true | |
poetry config virtualenvs.in-project true | |
- name: Cache poetry virtual environment | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | |
- name: Install, test with coverage report, and build | |
run: | | |
make install-all-deps | |
make test-with-coverage-reports | |
make build | |
- name: Push to CodeCov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage.xml | |
fail_ci_if_error: true |