Skip to content

Commit e0d13a3

Browse files
authored
Move from Travis CI to Github Actions (#7)
1 parent a116c46 commit e0d13a3

File tree

5 files changed

+59
-29
lines changed

5 files changed

+59
-29
lines changed

.github/workflows/cd.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CD
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
cd:
10+
runs-on: ubuntu-18.04
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Setup Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: '3.6'
20+
21+
- name: Install dependencies
22+
run: pip install -r requirements.txt
23+
24+
- name: Generate benchmark
25+
run: mkdir -p ./html && python -u -m benchmarks --display_format=html "$EMAILS_ZIP_URL" | tee ./html/index.html
26+
env:
27+
EMAILS_ZIP_URL: ${{ secrets.EMAILS_ZIP_URL }}
28+
29+
- name: Deploy report
30+
uses: peaceiris/actions-gh-pages@v3
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
publish_dir: ./html

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
10+
jobs:
11+
ci:
12+
runs-on: ubuntu-18.04
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions/setup-python@v2
17+
with:
18+
python-version: '3.6'
19+
- run: pip install -r requirements.txt -r requirements-dev.txt
20+
- run: flake8 benchmarks
21+
- run: isort --check-only benchmarks
22+
- run: python -m benchmarks.tests

.travis.yml

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

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ Benchmarks for the Lokole [email data exchange protocol](https://github.com/asco
88
99
## Setup
1010

11-
Install the requirements with `pip install -r requirements.txt`.
11+
Install the requirements with `pip install -r requirements.txt -r requirements-dev.txt`.
1212

1313
Run the tests with `python3 -m benchmarks.tests` and run the linter with `flake8 benchmarks`.
1414

1515
Run the benchmarks via `python3 -u -m benchmarks <emails-zip-url>`.
1616

1717
## Results
1818

19-
Benchmark results are kept up to date by Travis at [ascoderu/compression-benchmarks](https://ascoderu.ca/compression-benchmarks/).
19+
Benchmark results are kept up to date by Github Actions at [ascoderu/compression-benchmarks](https://ascoderu.ca/compression-benchmarks/).

requirements-dev.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
flake8
2+
isort

0 commit comments

Comments
 (0)