-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
57 additions
and
3,336 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Production CI | ||
|
||
on: | ||
push: | ||
branches: [production] | ||
pull_request: | ||
branches: [production] | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_USER: postgres | ||
ports: | ||
- 5432:5432 | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Install Poetry | ||
run: pip install poetry==1.1.14 | ||
- name: Install dependencies | ||
run: poetry install | ||
- name: Start postgresql | ||
run: sudo systemctl start postgresql | ||
- name: Build database | ||
run: poetry run invoke init-db | ||
- name: Setup chromedriver | ||
uses: nanasess/setup-chromedriver@master | ||
- run: | | ||
export DISPLAY=:99 | ||
chromedriver --url-base=/wd/hub & | ||
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & | ||
- name: Run pylint | ||
run: poetry run pylint viiteri | ||
- name: Run unit tests | ||
run: poetry run coverage run --branch -m pytest | ||
- name: Run robot tests | ||
run: bash run_robot_tests.sh | ||
- name: Coverage report | ||
run: poetry run coverage xml | ||
- name: Coverage report to Codecov | ||
run: bash <(curl -s https://codecov.io/bash) |
Oops, something went wrong.