ci: update uses
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 3s

This commit is contained in:
2026-01-24 19:08:30 +08:00
parent b7a0a9399e
commit ae1cfb214a
167 changed files with 287022 additions and 2 deletions

View File

@@ -0,0 +1,51 @@
name: "Code Scanning - Action"
on:
push:
branches:
- main
pull_request:
# The branches below must be a subset of the branches above
branches:
- main
schedule:
- cron: '0 17 * * 5'
permissions:
actions: read
contents: read
security-events: write
jobs:
codeQL:
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
# Must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head of the pull request.
# Only include this option if you are running this workflow on pull requests.
fetch-depth: 2
# If this run was triggered by a pull request event then checkout
# the head of the pull request instead of the merge commit.
# Only include this step if you are running this workflow on pull requests.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
# Override language selection by uncommenting this and choosing your languages
with:
languages: 'javascript-typescript'
- run: |
npm install
npm run all
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4

View File

@@ -0,0 +1,183 @@
name: "build-and-test"
on:
pull_request:
branches:
- main
push:
branches:
- main
permissions:
contents: read
jobs:
# make sure build/ci work properly
build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v6
with:
node-version: 24.x
- uses: actions/checkout@v6
- run: |
npm install
npm run all
# Fail the build if there are changes.
- run: git diff --exit-code -- dist
# make sure the action works on a clean machine without building
test:
needs: [ build ]
strategy:
matrix:
os:
- ubuntu-latest
- ubuntu-22.04-arm
- macos-latest
- windows-latest
version:
- ""
- "latest"
- "v2.5"
- "v2.5.0"
runs-on: ${{ matrix.os }}
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24.x
- uses: actions/setup-go@v6
with:
go-version: oldstable
- uses: ./
with:
version: ${{ matrix.version }}
args: --timeout=5m --issues-exit-code=0 ./fixtures/simple/...
only-new-issues: true
# make sure the action works on a clean machine without building (go-install mode)
test-go-install:
needs: [ build ]
strategy:
matrix:
os:
- ubuntu-latest
- ubuntu-22.04-arm
- macos-latest
- windows-latest
version:
- ""
- "latest"
- "v2.5.0"
- "655e8ede5178280b2a640e185bc4a343aed0f54e"
runs-on: ${{ matrix.os }}
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24.x
- uses: actions/setup-go@v6
with:
go-version: oldstable
- uses: ./
with:
version: ${{ matrix.version }}
args: --timeout=5m --issues-exit-code=0 ./fixtures/simple/...
only-new-issues: true
install-mode: goinstall
test-go-mod:
needs: [ build ]
strategy:
matrix:
os:
- ubuntu-latest
- ubuntu-22.04-arm
- macos-latest
- windows-latest
wd:
- fixtures/go-mod
- fixtures/go-tool
runs-on: ${{ matrix.os }}
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24.x
- uses: actions/setup-go@v6
with:
go-version: oldstable
- uses: ./
with:
working-directory: ${{ matrix.wd }}
args: --timeout=5m --issues-exit-code=0 ./...
# make sure the action works on a clean machine with plugins
test-plugins:
needs: [ build ]
strategy:
matrix:
os:
- ubuntu-latest
- ubuntu-22.04-arm
- macos-latest
- windows-latest
version:
- ""
- "latest"
- "v2.5"
- "v2.5.0"
runs-on: ${{ matrix.os }}
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24.x
- uses: actions/setup-go@v6
with:
go-version: oldstable
- uses: ./
with:
version: ${{ matrix.version }}
working-directory: fixtures/plugins
args: --timeout=5m --issues-exit-code=0 ./...
test-monorepo:
needs: [ build ]
strategy:
matrix:
os:
- ubuntu-latest
- ubuntu-22.04-arm
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24.x
- uses: actions/setup-go@v6
with:
go-version: oldstable
- uses: ./
with:
working-directory: fixtures/monorepo
experimental: "automatic-module-directories"
args: --timeout=5m --issues-exit-code=0 ./...