Skip to content

Create basic integration test #140

Create basic integration test

Create basic integration test #140

Workflow file for this run

name: build
on:
pull_request:
branches:
- main
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
- uses: mamba-org/setup-micromamba@v2
with:
environment-file: workflow/envs/github-actions.yml
cache-environment: true
- name: git config
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Style R code
shell: bash -el {0}
run: |
R -e 'usethis::use_tidy_style()'
git add workflow/scripts
git diff-index --quiet HEAD \
|| git commit \
-m '🎨 Style R code'
- name: Style Python code
shell: bash -el {0}
run: |
black workflow/
snakefmt workflow/
git add workflow/scripts workflow/rules workflow/Snakefile
git diff-index --quiet HEAD \
|| git commit \
-m '🎨 Style Python & Snakemake code 🐍'
- name: Build graphs
uses: snakemake/[email protected]
with:
directory: .
snakefile: workflow/Snakefile
args: "--use-conda --conda-frontend mamba --cores 2 make_graph_figures --configfile config/test.yaml"
- name: Update container file
uses: snakemake/snakemake-github-action@v1
with:
directory: .
snakefile: 'workflow/Snakefile'
task: 'containerize'
- name: Commit
run: |
git add figures/graphviz
git commit -m "📊 Update graph figures" \
|| echo "No changes in figures/graphviz to commit"
git add Dockerfile
git commit -m "🐳 Update Dockerfile" \
|| echo "No changes in Dockerfile to commit"
git push
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}