Skip to content

Commit

Permalink
update github actions
Browse files Browse the repository at this point in the history
added build and docs workflows
added status badges
  • Loading branch information
Kieran B. Spooner committed Mar 18, 2024
1 parent 5873bed commit e1f6059
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 42 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Check ThermoParser builds

name: build

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build
run: |
python3 -m pip install .
32 changes: 32 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Build ThermoParser's docs

name: docs

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx sphinx_rtd_theme
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build docs with sphinx
run: |
cd docs; sphinx-build -b html src/ .
39 changes: 0 additions & 39 deletions .github/workflows/python-app.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Run ThermoParser's tests

name: tests

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install unitest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with unittest
run: |
python3 -m unittest
14 changes: 11 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@
|____________________________________:_______________________/____________:_____/
.. image:: https://travis-ci.com/smtg-bham/ThermoParser.svg?branch=master
:alt: The travis-ci badge
:target: https://travis-ci.com/smtg-bham/ThermoParser
.. image:: https://github.com/SMTG-Bham/ThermoParser/actions/workflows/build.yml/badge.svg
:alt: The build status badge
:target: https://github.com/SMTG-Bham/ThermoParser/actions/workflows/build.yml

.. image:: https://github.com/SMTG-Bham/ThermoParser/actions/workflows/tests.yml/badge.svg
:alt: The tests status badge
:target: https://github.com/SMTG-Bham/ThermoParser/actions/workflows/tests.yml

.. image:: https://github.com/SMTG-Bham/ThermoParser/actions/workflows/docs.yml/badge.svg
:alt: The docs status badge
:target: https://smtg-bham.github.io/ThermoParser/

ThermoParser is a toolkit used to simplify the analysis of data
produced by specialist materials science codes, centred around
Expand Down

0 comments on commit e1f6059

Please sign in to comment.