Skip to content

Commit

Permalink
Migrate testing pipeline to GitHub Actions (#1985)
Browse files Browse the repository at this point in the history
* Migrate testing pipeline to GitHub Actions

* Change branch target on push trigger

* Remove if condition in Codecov step

* Remove depth parameter in checkout step

* Remove blank line

* Try splitting lines in YAML file

* Remove manual trigger

* Try splitting lines in YAML file (again)

* Change Azure badge for GA; Fix Open in VSCode badge; Rearrange badges

* Try splitting lines in YAML file (again)

* Remove blank line
  • Loading branch information
epassaro authored Apr 27, 2022
1 parent 0bac84c commit 0674330
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 70 deletions.
48 changes: 0 additions & 48 deletions .azure-pipelines/run-unit-tests.yml

This file was deleted.

64 changes: 64 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# For more information about TARDIS pipelines, please refer to:
#
# https://tardis-sn.github.io/tardis/development/continuous_integration.html

name: tests

on:
push:
branches:
- '*'

pull_request:
branches:
- '*'

concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true

env:
PYTEST_FLAGS: --tardis-refdata=${{ github.workspace }}/tardis-refdata
--cov=tardis --cov-report=xml --cov-report=html
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

jobs:
build:

strategy:
matrix:
os: [ubuntu-latest, macos-latest]

defaults:
run:
shell: bash -l {0}

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- name: Clone tardis-sn/tardis-refdata
uses: actions/checkout@v2
with:
repository: tardis-sn/tardis-refdata
path: tardis-refdata
lfs: true

- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
environment-file: tardis_env3.yml
activate-environment: tardis
use-mamba: true

- name: Install package
run: pip install -e .

- name: Run tests
run: pytest tardis ${{ env.PYTEST_FLAGS }}

- name: Upload to Codecov
run: bash <(curl -s https://codecov.io/bash)
45 changes: 23 additions & 22 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,46 @@
TARDIS
======

TARDIS is a tool that creates synthetic observations (*spectra*) for exploding
stars (*supernovae*).

.. image:: https://img.shields.io/badge/Donate-to%20TARDIS-brightgreen.svg
:target: https://numfocus.salsalabs.org/donate-to-tardis/index.html

.. image:: https://open.vscode.dev/badges/open-in-vscode.svg
.. image:: https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A
:target: http://numfocus.org

.. image:: https://badges.gitter.im/Join%20Chat.svg
:target: https://gitter.im/tardis-sn/tardis

.. image:: https://img.shields.io/static/v1?logo=visualstudiocode&label=&message=Open%20in%20Visual%20Studio%20Code&labelColor=2c2c32&color=007acc&logoColor=007acc
:target: https://open.vscode.dev/tardis-sn/tardis
|
TARDIS is a tool that creates synthetic observations (*spectra*) for exploding
stars (*supernovae*).

.. image:: https://codecov.io/gh/tardis-sn/tardis/branch/master/graph/badge.svg
:target: https://codecov.io/gh/tardis-sn/tardis

.. image:: https://img.shields.io/endpoint?url=https://jsonbin.org/tardis-bot/tardis/badges/docstr-cov
:target: https://github.com/tardis-sn/tardis/actions/workflows/docstr-cov.yml?query=branch%3Amaster

.. image:: https://img.shields.io/badge/DOI-10.5281%2Fzenodo.592480-blue
:target: https://doi.org/10.5281/zenodo.592480

.. image:: https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A
:target: http://numfocus.org
:alt: Powered by NumFOCUS

.. image:: http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat
:target: http://www.astropy.org

.. image:: https://badges.gitter.im/Join%20Chat.svg
:target: https://gitter.im/tardis-sn/tardis

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
.. image:: https://github.com/tardis-sn/tardis/actions/workflows/tests.yml/badge.svg
:target: https://github.com/tardis-sn/tardis/actions/workflows/tests.yml

.. image:: https://github.com/tardis-sn/tardis/actions/workflows/documentation-build.yml/badge.svg
:target: https://tardis-sn.github.io/tardis/index.html

.. image:: https://dev.azure.com/tardis-sn/TARDIS/_apis/build/status/TARDIS%20tests?branchName=master
:target: https://dev.azure.com/tardis-sn/TARDIS/_build/latest?definitionId=6&branchName=master

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
|
******************************
Credits & Publication Policies
******************************

.. image:: https://img.shields.io/badge/DOI-10.5281%2Fzenodo.592480-blue
:target: https://doi.org/10.5281/zenodo.592480
|
We provide TARDIS as a free, open-source tool. If you are using it, please
adhere to a few policies and acknowledge the TARDIS Team.

Expand Down Expand Up @@ -188,6 +186,9 @@ The following BibTeX entries are needed for the references:
*******
License
*******
.. image:: http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat
:target: http://www.astropy.org
|
This project is Copyright (c) TARDIS Collaboration and licensed under
the terms of the BSD 3-Clause license. This package is based upon
Expand Down

0 comments on commit 0674330

Please sign in to comment.