Skip to content

added contact to home #307

added contact to home

added contact to home #307

Workflow file for this run

name: Lint and Test
on:
push:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: 'pip'
- name: Install dependencies
run: pip install -r requirements.txt -r requirements-dev.txt
- name: Lint
run: pylint dirtviz
test:
runs-on: ubuntu-latest
env:
DB_USER: dirtviz
DB_PASS: password
DB_HOST: localhost
DB_PORT: 5432
DB_DATABASE: dirtviz
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: 'pip'
- name: Install python dependencies
run: pip install -r requirements.txt
- name: Install k6
run: |
curl https://github.com/loadimpact/k6/releases/download/v0.26.2/k6-v0.26.2-linux64.tar.gz -L | tar xvz --strip-components 1
- name: Start services
run: docker compose up -d
- name: Wait for services to start
run: sleep 10s
- name: Save timestamp
id: timestamp
run: echo "start_time=$(date -Is)" >> $GITHUB_OUTPUT
- name: Apply migrations
run: alembic -c dirtviz/db/alembic.ini upgrade head
- name: Import example data
run: python import_example_data.py
- name: Run smoke test
run: ./k6 run tests/basic.js
- name: Save all logs
if: always()
run: docker compose logs -t > dirtviz.log
- name: Save short logs
if: always()
run: docker compose logs -t --since ${{ steps.timestamp.outputs.start_time }} > dirtviz_short.log
- name: Check for errors
run: "! grep -i 'error' dirtviz_short.log"
- name: Upload log artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: DirtViz Logs
path: |
dirtviz.log
dirtviz_short.log