Skip to content

Commit

Permalink
Actions update (#1073)
Browse files Browse the repository at this point in the history
* update actions/checkout to v4
* update setup-python and cache to latest version
* update codeql, pnpm setup, up/download artifact action version
* add on.push to codeql
* add write permission to the cut_version
  • Loading branch information
kn-ms committed Apr 15, 2024
1 parent 3dc23fe commit 4b62713
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/actions/build-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: actions/setup-node@v4
with:
node-version: "16"
- uses: pnpm/action-setup@v2.4.0
- uses: pnpm/action-setup@v3
with:
version: 8.10.4
- run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/pip-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ runs:
using: "composite"
steps:
- name: Restore Pip Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }}
15 changes: 10 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: "Code scanning - action"

on: [pull_request]
on:
push:
branches: [main]

pull_request:
branches: [main]

jobs:
CodeQL-Build:
Expand All @@ -14,19 +19,19 @@ jobs:

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
# Override language selection by uncommenting this and choosing your languages
with:
languages: python

# 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@v2
uses: github/codeql-action/autobuild@v3

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

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
9 changes: 5 additions & 4 deletions .github/workflows/cut_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ jobs:

cut-new-version:
runs-on: ubuntu-latest
permissions: write-all

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'

Expand All @@ -26,7 +27,7 @@ jobs:
- run: bumpver update
- run: bumpver show --env > new-version.txt
- run: releaseherald generate --latest --no-update -t news.rst
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: new-version
path: |
Expand All @@ -38,7 +39,7 @@ jobs:
needs: cut-new-version

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: git pull origin
- uses: actions/download-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
security-events: write
pull-requests: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: pip install --upgrade bumpver
- run: bumpver update --no-commit
- uses: ./.github/actions/build-package
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/test_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
is_source_changed: ${{steps.check_source_change.outputs.changed}}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check if any source changed
Expand Down Expand Up @@ -48,9 +48,9 @@ jobs:
LINT_PYTHON_VERSION: "3.7"
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python ${{ env.LINT_PYTHON_VERSION }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ env.LINT_PYTHON_VERSION }}
- name: Restore pip cache
Expand All @@ -70,9 +70,9 @@ jobs:
REACT_APP_API_BASE_URL: "/fake/api/endpoint"
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Set up Node
Expand All @@ -82,7 +82,7 @@ jobs:
- name: Restore pip cache
uses: ./.github/actions/pip-cache
- name: Set up PNPM
uses: pnpm/action-setup@v2.4.0
uses: pnpm/action-setup@v3
with:
version: 8.10.4
- name: Setup
Expand All @@ -94,7 +94,7 @@ jobs:
CI=false doit build_ui
doit test_ui
- name: Archive ui artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ui_bundle
path: testplan/web_ui/testing/build
Expand All @@ -115,15 +115,15 @@ jobs:
steps:
- run: echo "BUILD ${{ matrix.os }} ${{ matrix.python-version }} ${{needs.is_source_changed.outputs.is_source_changed}}"
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Restore pip cache
uses: ./.github/actions/pip-cache
- name: Download ui bundle
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ui_bundle
path: testplan/web_ui/testing/build
Expand Down

0 comments on commit 4b62713

Please sign in to comment.