-
Notifications
You must be signed in to change notification settings - Fork 114
156 lines (156 loc) · 5.7 KB
/
test.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: Tests
on:
push:
pull_request:
schedule:
# Run at midnight UTC every Tuesday
- cron: '0 0 * * 2'
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
if: github.event_name != 'schedule' || github.repository_owner == 'galaxyproject'
runs-on: ${{ matrix.os }}
services:
postgres:
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
tox_env: py38
galaxy_version: dev
galaxy_python_version: '3.8'
- os: ubuntu-latest
tox_env: py38
galaxy_version: release_24.1
galaxy_python_version: '3.8'
- os: ubuntu-latest
tox_env: py38
galaxy_version: release_24.0
galaxy_python_version: '3.8'
# Python 3.7 is not available via setup-python on ubuntu >=24.04
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_23.2
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_23.1
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_23.0
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_22.05
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_22.01
galaxy_python_version: '3.7'
# The minimum Python supported version by the following releases is
# 3.6, but it is EOL
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_21.09
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_21.05
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_21.01
galaxy_python_version: '3.7'
# The minimum Python supported version by the following releases is
# 3.5, but it is EOL
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_20.09
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_20.05
galaxy_python_version: '3.7'
# The minimum Python supported version by the following releases is
# 2.7, but it is EOL
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_20.01
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_19.09
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_19.05
galaxy_python_version: '3.7'
- os: ubuntu-latest
tox_env: py313
galaxy_version: dev
galaxy_python_version: '3.8'
# Cannot test on macOS because service containers are not supported
# yet: https://github.community/t/github-actions-services-available-on-others-vms/16916
# - os: macos-latest
# tox_env: py38
# galaxy_version: dev
# galaxy_python_version: '3.8'
steps:
- uses: actions/checkout@v4
- name: Cache pip dir
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.tox_env }}-${{ matrix.galaxy_version }}
- name: Calculate Python version for BioBlend from tox_env
id: get_bioblend_python_version
run: echo "bioblend_python_version=$(echo "${{ matrix.tox_env }}" | sed -e 's/^py\([3-9]\)\([0-9]\+\)/\1.\2/')" >> $GITHUB_OUTPUT
- name: Set up Python for BioBlend
uses: actions/setup-python@v5
with:
python-version: ${{ steps.get_bioblend_python_version.outputs.bioblend_python_version }}
- name: Install tox
run: |
python3 -m pip install --upgrade pip setuptools
python3 -m pip install 'tox>=1.8.0'
- name: Set up Python for Galaxy
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.galaxy_python_version }}
- name: Run tests
env:
PGPASSWORD: postgres
PGPORT: 5432
PGHOST: localhost
run: |
# Create a PostgreSQL database for Galaxy. The default SQLite3 database makes test fail randomly because of "database locked" error.
createdb -U postgres galaxy
# Run ToolShed tests only once per Python version
if [ "${{ matrix.galaxy_version }}" = 'dev' ]; then
export BIOBLEND_TOOLSHED_URL=https://testtoolshed.g2.bx.psu.edu/
fi
# Install Galaxy
GALAXY_DIR=galaxy-${{ matrix.galaxy_version }}
git clone --depth=1 -b ${{ matrix.galaxy_version }} https://github.com/galaxyproject/galaxy $GALAXY_DIR
export DATABASE_CONNECTION=postgresql://postgres:@localhost/galaxy
./run_bioblend_tests.sh -g $GALAXY_DIR -v python${{ matrix.galaxy_python_version }} -e ${{ matrix.tox_env }}
- name: The job has failed
if: ${{ failure() }}
run: |
cat galaxy-${{ matrix.galaxy_version }}/*.log