Skip to content

Commit 4160901

Browse files
committed
Creating separate workflows
1 parent fa732a6 commit 4160901

File tree

3 files changed

+99
-33
lines changed

3 files changed

+99
-33
lines changed

.github/workflows/ci_crontests.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CI-crontests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- '*'
9+
pull_request:
10+
branches:
11+
- main
12+
schedule:
13+
# run every Monday at 5am UTC
14+
- cron: '0 5 * * 1'
15+
16+
jobs:
17+
tests:
18+
name: ${{ matrix.name }}
19+
runs-on: ${{ matrix.os }}
20+
# if: github.event_name == 'schedule' && github.repository == 'astropy/astroquery'
21+
strategy:
22+
fail-fast: true
23+
matrix:
24+
include:
25+
- name: Python 3.8 with all dependencies with remote data
26+
os: ubuntu-latest
27+
python: '3.8'
28+
toxenv: py38-test-alldeps-devdeps
29+
toxargs: -v
30+
toxposargs: --remote-data
31+
32+
- name: pre-repease dependencies with all dependencies
33+
os: ubuntu-latest
34+
python: '3.10'
35+
toxenv: py310-test-alldeps-predeps
36+
toxargs: -v
37+
38+
steps:
39+
- name: Checkout code
40+
uses: actions/checkout@v2
41+
with:
42+
fetch-depth: 0
43+
- name: Set up Python
44+
uses: actions/setup-python@v2
45+
with:
46+
python-version: ${{ matrix.python }}
47+
- name: Install Python dependencies
48+
run: python -m pip install --upgrade tox
49+
- name: Run tests
50+
run: tox ${{ matrix.toxargs }} -e ${{ matrix.toxenv }} -- ${{ matrix.toxposargs }}

.github/workflows/ci_devtests.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# This test job is separated out into its own workflow to be able to obtain a separate badge for it
2+
name: CI-devtest
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
tags:
9+
- '*'
10+
pull_request:
11+
branches:
12+
- main
13+
schedule:
14+
# run every Monday at 5am UTC
15+
- cron: '0 5 * * 1'
16+
17+
jobs:
18+
tests:
19+
name: ${{ matrix.name }}
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
fail-fast: true
23+
matrix:
24+
include:
25+
- name: dev dependencies with all dependencies with coverage
26+
os: ubuntu-latest
27+
python: '3.10'
28+
toxenv: py310-test-alldeps-devdeps-cov
29+
toxargs: -v
30+
31+
steps:
32+
- name: Checkout code
33+
uses: actions/checkout@v2
34+
with:
35+
fetch-depth: 0
36+
- name: Set up Python
37+
uses: actions/setup-python@v2
38+
with:
39+
python-version: ${{ matrix.python }}
40+
- name: Install Python dependencies
41+
run: python -m pip install --upgrade tox
42+
- name: Run tests
43+
run: tox ${{ matrix.toxargs }} -e ${{ matrix.toxenv }} -- ${{ matrix.toxposargs }}
44+
- name: Upload coverage to codecov
45+
if: contains(matrix.toxenv,'-cov')
46+
uses: codecov/codecov-action@v2
47+
with:
48+
file: ./coverage.xml

.github/workflows/ci_tests.yml

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Developer version testing as well as cron testings are in separate workflows
12
name: CI
23

34
on:
@@ -33,18 +34,6 @@ jobs:
3334
toxenv: py37-test-oldestdeps
3435
toxargs: -v
3536

36-
- name: dev dependencies with all dependencies with coverage
37-
os: ubuntu-latest
38-
python: '3.10'
39-
toxenv: py310-test-alldeps-devdeps-cov
40-
toxargs: -v
41-
42-
- name: pre-repease dependencies with all dependencies
43-
os: ubuntu-latest
44-
python: '3.10'
45-
toxenv: py310-test-alldeps-predeps
46-
toxargs: -v
47-
4837
- name: Python 3.8 with all optional dependencies (MacOS X)
4938
os: macos-latest
5039
python: 3.8
@@ -76,27 +65,6 @@ jobs:
7665
with:
7766
file: ./coverage.xml
7867

79-
# This needs to be outside of matrix because if is not supported
80-
# for only one job in a matrix. But once that is supported, this can go
81-
# back to the matrix above.
82-
remote_data:
83-
name: Python 3.8 with all dependencies with remote data
84-
if: github.event_name == 'schedule' && github.repository == 'astropy/astroquery'
85-
runs-on: ubuntu-latest
86-
steps:
87-
- name: Checkout code
88-
uses: actions/checkout@v2
89-
with:
90-
fetch-depth: 0
91-
- name: Set up Python
92-
uses: actions/setup-python@v2
93-
with:
94-
python-version: '3.8'
95-
- name: Install Python dependencies
96-
run: python -m pip install --upgrade tox
97-
- name: Run tests
98-
run: tox -v -e py38-test-alldeps-devastropy -- --remote-data
99-
10068
egg_info:
10169
name: egg_info with Python 3.7
10270
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)