Skip to content

Add python-publish.yml (#9) #78

Add python-publish.yml (#9)

Add python-publish.yml (#9) #78

Workflow file for this run

name: Build physics-driven-ml
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
concurrency:
# Cancels jobs running if new commits are pushed
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
container:
image: firedrakeproject/firedrake-vanilla:latest
options: --user root
steps:
- uses: actions/checkout@v2
- name: Install torch
shell: bash -l {0}
run: |
source /home/firedrake/firedrake/bin/activate
python -m pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
- name: Install physics-driven-ml
shell: bash -l {0}
run: |
source /home/firedrake/firedrake/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .
- name: Test with pytest
shell: bash -l {0}
run: |
source /home/firedrake/firedrake/bin/activate
python -m pytest ./tests/