Skip to content

prod

prod #43

Workflow file for this run

---
name: prod
on:
push:
branches:
- "master"
workflow_dispatch:
inputs:
logLevel:
description: "Log level"
required: true
default: "warning"
schedule:
- cron: "0 0 1 */1 *"
# - cron: "*/5 * * * *" # 5 min testing
jobs:
ci:
name: ci
runs-on: ubuntu-latest
env:
using_act: ${{ github.actor == 'nektos/act'}}
is_cron: ${{ github.event_name == 'schedule' }}
GMAIL_PASS: ${{ secrets.GMAIL_PASS }}
GMAIL_ADDR: ${{ secrets.GMAIL_ADDR }}
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }}
python_version: '3.7.10'
steps:
- name: Checkout.
uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ env.python_version }}
- name: Make sure path are there also for act shells.
if: env.using_act == 'true'
run: |
echo "export PATH=\"/opt/hostedtoolcache/Python/${{ env.python_version }}/x64:/opt/hostedtoolcache/Python/${{ env.python_version }}/x64/bin:$PATH\"" >> /root/.bashrc
- name: Upgrade pip.
run: python -m pip install --upgrade pip
- name: Install poetry and invoke.
run: pip install poetry invoke
- name: Configure poetry
run: poetry config virtualenvs.in-project true
- name: Install dependencies with poetry.
run: inv install
- name: Launch the tests (with coverage).
run: inv test-cov
- name: Prepare the coveralls config.
run: |
echo "repo_token: ${{ secrets.COVERALLS_TOKEN }}" > .coveralls.yml
- name: Upload coverage stats
run: inv publish-coverage