Skip to content

Commit

Permalink
Create actions.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mdoucet authored Oct 10, 2023
1 parent 9dda1d5 commit 5360f7b
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
workflow_dispatch:
pull_request:
push:
branches:
- master

jobs:
tests:
runs-on: self-hosted
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge,defaults,mantid
auto-update-conda: true
miniforge-version: latest
python-version: "3.8"
environment-file: environment.yml
activate-environment: liquid-ref
- name: Restore cached conda environment
id: cache-load
uses: actions/cache/restore@v3
with:
path: /usr/share/miniconda/envs/liquid-ref
key: ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }}
- name: Load Environment
if: steps.cache-load.outputs.cache-hit != 'true'
run: |
mamba env update --file environment.yml --prune
- name: Start xvfb daemon
run: |
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
- name: Test with pytest
run: |
git submodule add --force https://code.ornl.gov/sns-hfir-scse/infrastructure/test-data/liquidsreflectometer-data.git tests/data/liquidsreflectometer-data
git submodule update --init
python -m pytest --cov=reduction --cov=scripts --cov-report=xml --cov-report=term -m datarepo
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 5360f7b

Please sign in to comment.