Skip to content

🔀 merge from develop #73

🔀 merge from develop

🔀 merge from develop #73

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: tests
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: Run the build with tmate debugging enabled
required: false
default: false
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "test"
test:
# The type of runner that the job will run on
strategy:
matrix:
python-versions: ["3.11"]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout the repository
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-versions }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry tox tox-gh-actions
- name: Install Singularity
uses: eWaterCycle/setup-singularity@v7
with:
singularity-version: 3.8.7
- name: Install Spack
uses: actions/checkout@v3
with:
repository: spack/spack
ref: 0707ffd4e466402bf19dff1add59eaf2b6d9154e
path: spack
- name: Install Spack templates
uses: actions/checkout@v3
with:
repository: wtsi-hgi/softpack-templates
ref: main
path: templates
- name: Create Spack config
env:
CONFIG_PATH: $HOME/.spack
CONFIG_FILE: config.yaml
run: |
mkdir -p ${{ env.CONFIG_PATH }}
cat <<EOF > ${{ env.CONFIG_PATH }}/$CONFIG_FILE
config:
template_dirs:
- $GITHUB_WORKSPACE/templates
EOF
- name: Create GPG key
run: |
SPACK_GNUPGHOME=$HOME/.gpg $GITHUB_WORKSPACE/spack/bin/spack gpg create softpack [email protected]
- name: Update PATH
run: |
echo "$GITHUB_WORKSPACE/spack/bin" >> $GITHUB_PATH
- name: Run tests
run: poetry run tox
- name: Run code coverage
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
files: coverage.xml