Skip to content

Commit

Permalink
Add build and test checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Ramirez committed May 15, 2024
1 parent 5fb3750 commit 375cb48
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build

on: push
concurrency: gpu

jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: poetry install
- name: Build figures
run: make all -j 2
- name: Upload files
uses: actions/upload-artifact@v4
with:
name: files
path: |
output/*.svg
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Test

on: push

jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: poetry install
- name: Run mypy check
run: make mypy
- name: Run ruff check
run: poetry run ruff check spatialpf2
- name: Run ruff format check
run: poetry run ruff format --check spatialpf2
- name: Test with pytest
run: make coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true

0 comments on commit 375cb48

Please sign in to comment.