Skip to content
Snippets Groups Projects
Commit 5dfa3656 authored by Sigurd's avatar Sigurd
Browse files

test

parent caaa816e
No related branches found
No related tags found
No related merge requests found
name: Main
on: [push]
on:
push:
branches:
- master
jobs:
build:
test:
name: test
runs-on: ubuntu-latest
container: python:3.8
defaults:
run:
shell: bash
working-directory: ./backend/secfit
steps:
- run: apt-get update -qy
- run: pip install -r requirements.txt
staging:
name: staging
runs-on: ubuntu-latest
container: ruby
needs: [test]
steps:
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pip install pytest
export PYTHONPATH=src
pytest
- run: apt-get update -qy
- run: apt-get install -y ruby-dev
- run: gem install dpl
- run: dpl --provider=heroku --app=tdt4242-base-frontend --api-key=${{secrets.HEROKU_STAGING_API_KEY}}
- run: dpl --provider=heroku --app=tdt4242-base-backend --api-key=${{secrets.HEROKU_STAGING_API_KEY}}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment