This repository has been archived by the owner on Aug 21, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 17
60 lines (56 loc) · 2.2 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- '*'
pull_request:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8.5]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
DB_PORT: ${{ secrets.DB_PORT }}
SOCIAL_AUTH_TRAILING_SLASH: ${{ secrets.SOCIAL_AUTH_TRAILING_SLASH }}
SOCIAL_AUTH_AUTH0_DOMAIN: ${{ secrets.SOCIAL_AUTH_AUTH0_DOMAIN }}
SOCIAL_AUTH_AUTH0_KEY: ${{ secrets.SOCIAL_AUTH_AUTH0_KEY }}
SOCIAL_AUTH_AUTH0_SECRET: ${{ secrets.SOCIAL_AUTH_AUTH0_SECRET }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
# Install dependencies
set -xe
python3 -m pip install --upgrade pip setuptools wheel
pip3 install flake8 pytest
if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi
- name: Lint with flake8
run: |
# 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
# Runs a single command using the runners shell
- name: Black Code Formatter
uses: psf/black@stable # already includes args "--check --diff"
# Run gitops local secrets_test.sh
- name: Secrets Test Env Runner
run: ./secrets_test.sh
# TODO(codecakes): Enable once module imports are fixed.
# - name: "Upload coverage to Codecov"
# uses: codecov/codecov-action@v1
# with:
# fail_ci_if_error: true