Skip to content

Commit 2a89817

Browse files
authored
CI: Migrate from Travis to GitHub Actions (#429)
1 parent bae1020 commit 2a89817

File tree

2 files changed

+63
-17
lines changed

2 files changed

+63
-17
lines changed

.github/workflows/ci.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: PyDataStructs Continuous Integration Tests
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{matrix.os}}
12+
timeout-minutes: 5
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [macos-latest, ubuntu-latest, windows-latest]
17+
python-version:
18+
- "3.7"
19+
- "3.8"
20+
- "3.9"
21+
- "3.10"
22+
23+
steps:
24+
- uses: actions/checkout@v2
25+
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v2
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
31+
- name: Upgrade pip version
32+
run: |
33+
python -m pip install --upgrade pip
34+
35+
- name: Install requirements
36+
run: |
37+
pip install -r requirements.txt
38+
pip install -r docs/requirements.txt
39+
40+
- name: Build package
41+
run: |
42+
python -m pip install .
43+
44+
- name: Run tests
45+
run: |
46+
python -m pytest --doctest-modules --cov=./ --cov-report=xml -s
47+
48+
- name: Upload Coverage
49+
uses: codecov/codecov-action@v2
50+
with:
51+
token: ${{ secrets.CODECOV_TOKEN }}
52+
directory: ./coverage/reports/
53+
env_vars: OS,PYTHON
54+
fail_ci_if_error: false
55+
files: ./coverage.xml
56+
flags: unittests
57+
name: codecov-umbrella
58+
path_to_write_report: ./coverage/codecov_report.txt
59+
verbose: true
60+
61+
- name: Build Documentation
62+
run: |
63+
sphinx-build -b html docs/source/ docs/build/html

.travis.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)