-
Notifications
You must be signed in to change notification settings - Fork 5
89 lines (76 loc) · 2.51 KB
/
lib-community-ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# # Example of workflow trigger for calling workflow (the client).
# name: ci-vizard
# on:
# pull_request:
# branches: ["dev"]
# push:
# branches: ["dev"]
# jobs:
# ci:
# uses: qiime2/distributions/.github/workflows/lib-community-ci.yaml@dev
# with:
# distro: amplicon
# release-epoch: 2024.10
# github-org-name: qiime2
# github-repo-name: q2-vizard
# TODO: note that default is main branch; can leave blank unless special target
# github-env-ref: dev
# env-file-name: 2024.5-vizard-environment.yml
on:
workflow_call:
inputs:
distro:
description: "Distro to test with"
type: string
required: true
release-epoch:
description: "Release target for distro to test with"
type: number
required: true
github-org:
description: "Organization or username on Github"
type: string
required: true
github-repo:
description: "Plugin repository name on Github"
type: string
required: true
github-env-ref:
description: "Target branch/ref name on Github for environment file"
type: string
required: false
default: ''
env-file-name:
description: "Name of environment file to test with"
type: string
required: true
jobs:
install-env-and-test:
strategy:
matrix:
os: [ubuntu-latest, macos-12]
runs-on: ${{ matrix.os }}
env:
name: ${{ inputs.github-repo }}
filepath: https://raw.githubusercontent.com/${{ inputs.github-org }}/${{ inputs.github-repo }}/${{ inputs.github-env-ref }}/environment-files/${{ inputs.env-file-name }}
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: 'latest'
python-version: 3.9
environment-file: ${{ env.filepath }}
activate-environment: ${{ env.name }}
- name: 'install pytest, run qiime info & run tests'
shell: bash -el {0}
run: |
conda install pytest
qiime info
pytest
# - name: 'Install and activate test environment'
# run: |
# conda env create
# -n ${{ env.github_repo }}
# -f https://raw.githubusercontent.com/{{ github-org }}/{{ github-repo }}/{{ github-env-ref }}/environment-files/{{ env-file-name }}
# conda activate ${{ env.github_repo }}
# TODO: run tests using makefile
- name: 'Run tests for ${{ env.github_repo }}'