-
Notifications
You must be signed in to change notification settings - Fork 20
/
action.yaml
75 lines (61 loc) · 2.27 KB
/
action.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
name: Setup integration tests
description: >-
Sets up prerequisites for run-integration-tests, namely installing software
needed by the "ambient" runner and cloning zika-tutorial for use as an test
build.
Jobs which use this action must also set
defaults:
run:
shell: bash -l -eo pipefail {0}
at the job level (or the equivalent "shell:" key at the step level) to
activate the integration Conda environment by default.
inputs:
python-version:
description: Version of Python to use for conda-incubator/setup-miniconda.
type: string
required: true
runs:
using: composite
steps:
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ inputs.python-version }}
mamba-version: "*"
channels: conda-forge,bioconda
channel-priority: true
activate-environment: test
- run: cat ~/.profile || true
shell: bash -l -eo pipefail {0}
- run: cat ~/.bash_profile || true
shell: bash -l -eo pipefail {0}
- run: cat ~/.bashrc || true
shell: bash -l -eo pipefail {0}
# Install software for the "ambient" runner; not supported on Windows.
- if: runner.os != 'Windows'
run: mamba install augur auspice snakemake
shell: bash -l -eo pipefail {0}
- run: conda info
shell: bash -l -eo pipefail {0}
- run: conda list
shell: bash -l -eo pipefail {0}
- if: runner.os == 'Windows'
name: Fix python vs. python3 mismatch on Windows
shell: bash -l -eo pipefail {0}
run: |
python="$(type -p python)"
cp -v "$python" "$(dirname "$python")"/python3
- name: Check python version
shell: bash -l -eo pipefail {0}
run: |
# Assert that we're on the expected Python version, in case the GH
# Actions environment is messed up.
type python
python --version
type python3
python3 --version
python --version | grep -F 'Python ${{ inputs.python-version }}.'
python3 --version | grep -F 'Python ${{ inputs.python-version }}.'
[[ "$(python --version)" == "$(python3 --version)" ]]
# Clone the small build we'll use as an integration test case.
- run: git clone https://github.com/nextstrain/zika-tutorial
shell: bash -l -eo pipefail {0}