Skip to content

Commit 4f2b135

Browse files
authored
Merge pull request #38 from willianpaixao/add-github-actions
Introduce Github actions workflow
2 parents 22132f9 + f853d7e commit 4f2b135

File tree

2 files changed

+41
-17
lines changed

2 files changed

+41
-17
lines changed

.github/workflows/main.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Python packaging
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: [3.8, 3.9]
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
- name: Set up Python ${{ matrix.python-version }}
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
- name: Caching packages
19+
uses: actions/cache@v2
20+
with:
21+
path: ~/.cache/pip
22+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
23+
restore-keys: |
24+
${{ runner.os }}-pip-
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install -r requirements.txt
28+
python -m pip install flake8 coverage
29+
- name: Analysing the code with Flake8
30+
continue-on-error: true
31+
run: |
32+
flake8
33+
- name: Running unit tests
34+
continue-on-error: true
35+
run: |
36+
python setup.py test
37+
- name: Running coverage tests
38+
continue-on-error: true
39+
run: |
40+
python setup.py --quiet install
41+
coverage run --source fredapi.fred fredapi/tests/test_fred.py

.travis.yml

-17
This file was deleted.

0 commit comments

Comments
 (0)