Skip to content

Commit

Permalink
ci: migrate to github actions (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloCastellano authored Sep 27, 2022
1 parent c53b83f commit 4f2ac18
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 23 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/bormeparser_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Bormeparser CI

on: ["push", "pull_request"]

env:
PYTHON_VERSION: 3.9.13
PIP_VERSION: 22.1.2

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
docs:
name: 'Documentation build'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'
- name: Install dependencies
run: |
pip install --upgrade pip==${{ env.PIP_VERSION }}
pip install -r requirements_doc.txt
pip install -e .
git rev-parse HEAD
- name: Build html docs
run: cd docs && make html

# TODO: add lint job

test:
name: 'Bormeparser tests'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'
- name: Install dependencies
run: |
pip install --upgrade pip==${{ env.PIP_VERSION }} wheel
pip install coveralls
pip install -r requirements.txt
./setup.py -q develop
- name: Run tests
run: coverage run --source=bormeparser setup.py test
- name: Publish to coveralls.io
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion requirements/development.txt → requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-r base.txt
-r requirements.txt
bpython==0.23
coverage==6.4.4
zest.releaser==7.0.0
File renamed without changes.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def get_install_requires():
parse requirements.txt, ignore links, exclude comments
"""
requirements = []
for requirements_file in ('requirements/base.txt',):
for requirements_file in ('requirements.txt',):
for line in open(requirements_file).readlines():
line = line.rstrip()
# skip to next iteration if comment or empty line
Expand Down

0 comments on commit 4f2ac18

Please sign in to comment.