Skip to content

Commit

Permalink
CI: Add building and testing actions (#8)
Browse files Browse the repository at this point in the history
* working on build actions

* add test stage in actions

* removed two stages -- it runs too long

* change invoke to main
  • Loading branch information
yanghan234 authored Sep 10, 2024
1 parent 56aefcb commit 997e930
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and Test with Mamba

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build_and_test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Micromamba
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: 'latest'
environment-file: environment.yaml
init-shell: >-
bash
cache-environment: true
post-cleanup: 'all'

- name: Install dependencies
run: |
micromamba run -n mattersim pip install -e .
- name: Run tests
run: |
micromamba run -n mattersim pytest -s tests

0 comments on commit 997e930

Please sign in to comment.