Skip to content

Commit 2943b2e

Browse files
authored
Merge pull request #1940 from pllim/action-skip-ci
TST: Enable skip CI
2 parents c8e831a + 0f34cfa commit 2943b2e

File tree

3 files changed

+59
-6
lines changed

3 files changed

+59
-6
lines changed

.github/workflows/ci_tests.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,32 @@ on:
1414
- cron: '0 5 * * 1'
1515

1616
jobs:
17+
cancel_ci:
18+
name: Mandatory checks before CI
19+
runs-on: ubuntu-latest
20+
outputs:
21+
run_next: ${{ steps.skip_ci_step.outputs.run_next }}
22+
steps:
23+
- name: Check skip CI
24+
uses: pllim/action-skip-ci@main
25+
id: skip_ci_step
26+
with:
27+
NO_FAIL: true
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
# This should only run if we did not skip CI
30+
- name: Cancel Previous Runs
31+
uses: styfle/cancel-workflow-action@ce17749
32+
if: steps.skip_ci_step.outputs.run_next == 'true'
33+
with:
34+
access_token: ${{ secrets.GITHUB_TOKEN }}
35+
36+
# The rest only run if above are done (unless cron only)
37+
1738
tests:
1839
name: ${{ matrix.name }}
1940
runs-on: ${{ matrix.os }}
41+
needs: cancel_ci
42+
if: needs.cancel_ci.outputs.run_next == 'true'
2043
strategy:
2144
fail-fast: true
2245
matrix:
@@ -100,6 +123,8 @@ jobs:
100123
egg_info:
101124
name: egg_info with Python 3.7
102125
runs-on: ubuntu-latest
126+
needs: cancel_ci
127+
if: needs.cancel_ci.outputs.run_next == 'true'
103128
steps:
104129
- name: Checkout code
105130
uses: actions/checkout@v2

.github/workflows/codeql-analysis.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,33 @@ on:
1919
branches: [ master ]
2020

2121
jobs:
22+
cancel_ci:
23+
name: Mandatory checks before CI
24+
runs-on: ubuntu-latest
25+
outputs:
26+
run_next: ${{ steps.skip_ci_step.outputs.run_next }}
27+
steps:
28+
- name: Check skip CI
29+
uses: pllim/action-skip-ci@main
30+
id: skip_ci_step
31+
with:
32+
NO_FAIL: true
33+
SKIP_DIRECTIVES: '[skip ci],[ci skip],[skip codeql],[codeql skip]'
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
# This should only run if we did not skip CI
36+
- name: Cancel Previous Runs
37+
uses: styfle/cancel-workflow-action@ce17749
38+
if: steps.skip_ci_step.outputs.run_next == 'true'
39+
with:
40+
access_token: ${{ secrets.GITHUB_TOKEN }}
41+
42+
# The rest only run if above are done
43+
2244
analyze:
2345
name: Analyze
2446
runs-on: ubuntu-latest
47+
needs: cancel_ci
48+
if: needs.cancel_ci.outputs.run_next == 'true'
2549

2650
strategy:
2751
fail-fast: false

README.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44
:target: https://img.shields.io/pypi/v/astroquery.svg
55
:alt: Latest PyPI version
66

7-
.. image:: https://travis-ci.com/astropy/astroquery.svg?branch=master
8-
:target: https://travis-ci.com/astropy/astroquery
9-
:alt: Travis CI Status
7+
.. image:: https://readthedocs.org/projects/astroquery/badge/?version=latest
8+
:target: https://astroquery.readthedocs.io/en/latest/?badge=latest
9+
:alt: Documentation Status
1010

11-
.. image:: https://coveralls.io/repos/astropy/astroquery/badge.png
12-
:target: https://coveralls.io/r/astropy/astroquery
13-
:alt: Coverage Status
11+
.. image:: https://github.com/astropy/astroquery/workflows/CI/badge.svg
12+
:target: https://github.com/astropy/astroquery/actions?query=workflow%3ACI
13+
:alt: Github Actions CI Status
14+
15+
.. image:: https://codecov.io/gh/astropy/astroquery/branch/master/graph/badge.svg
16+
:target: https://codecov.io/gh/astropy/astroquery
17+
:alt: Coverage results
1418

1519
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1160627.svg
1620
:target: https://doi.org/10.5281/zenodo.1160627

0 commit comments

Comments
 (0)