Skip to content

Commit

Permalink
Merge pull request #91 from pllim/tst-update
Browse files Browse the repository at this point in the history
TST: Update workflows, use built-in cancel
  • Loading branch information
pllim committed May 10, 2022
2 parents daff5cd + 34289dd commit faa39c3
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 32 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/cancel_workflows.yml

This file was deleted.

22 changes: 13 additions & 9 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ on:
# * is a special character in YAML so you have to quote this string
- cron: '0 6 * * 4'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
initial_check:
name: Mandatory checks before CI
runs-on: ubuntu-latest
steps:
- name: Check base branch
uses: actions/github-script@v3
uses: actions/github-script@v6
if: github.event_name == 'pull_request'
with:
script: |
Expand All @@ -33,11 +37,11 @@ jobs:
needs: initial_check
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Lint with flake8
Expand All @@ -56,11 +60,11 @@ jobs:
needs: initial_check
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: '3.8'
- name: Install and build
Expand All @@ -77,11 +81,11 @@ jobs:
needs: initial_check
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install and build
Expand All @@ -101,9 +105,9 @@ jobs:
if: ${{ github.event_name == 'schedule' }}
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install and build
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ on:
# The branches below must be a subset of the branches above
branches: [ master ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze
Expand All @@ -33,11 +37,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -48,7 +52,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -62,4 +66,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
4 changes: 2 additions & 2 deletions .github/workflows/open_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Comment Draft PR'
uses: actions/github-script@v3
uses: actions/github-script@v6
if: github.event.pull_request.draft == true
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.issues.createComment({
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down

0 comments on commit faa39c3

Please sign in to comment.