-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.13 KB
/
actions.yaml
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
name: Curso Django
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build:
env:
PIPENV_NO_INHERIT: 1
PIPENV_IGNORE_VIRTUALENVS: 1
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15.2
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports: [ '5432:5432' ]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -q pipenv
pipenv sync -d
cp contrib/env-sample .env
- name: Lint with flake8
run: |
pipenv run flake8 .
- name: Tests with pytest
run: |
pipenv run pytest --cov=pypro --cov-report=xml
- name: Upload coverage reports to Codecov with GitHub Action...
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}