Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GitHub actions instead of Travis #39

Merged
merged 4 commits into from
Dec 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Tests
on:
push:
branches:
- master
pull_request:

env:
COVERALLS_PARALLEL: true
LOGGING: info

jobs:
core-tests:
runs-on: ubuntu-latest

strategy:
matrix:
config:
- {python-version: 3.5}
- {python-version: 3.6}
- {python-version: 3.7}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does bb support Python 3.8?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Officially, no, but in practice, I'm pretty sure it should. I'm going to attempt to add support for both 3.8 and 3.9. 🙂


steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.4.1
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.config.python-version }}

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install -r requirements.txt
pip install wheel codecov pytest pytest-cov --upgrade

- name: Install Blackbird
run: |
pip install -e .

- name: Run tests
run: python3 -m pytest blackbird_python/blackbird/tests --cov=blackbird_python/blackbird --cov-report=term-missing --cov-report=xml -p no:warnings --tb=native

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Blackbird Quantum Assembly Language
###################################

.. image:: https://img.shields.io/travis/com/XanaduAI/blackbird/master.svg?style=for-the-badge
:alt: Travis
:target: https://travis-ci.com/XanaduAI/blackbird/
.. image:: https://img.shields.io/github/workflow/status/XanaduAI/blackbird/Tests/master?logo=github&style=flat-square
:alt: GitHub Workflow Status (branch)
:target: https://github.com/XanaduAI/blackbird/actions?query=workflow%3ATests

.. image:: https://img.shields.io/codecov/c/github/xanaduai/blackbird/master.svg?style=for-the-badge
:alt: Codecov coverage
Expand Down