Skip to content

Commit

Permalink
Merge branch 'master' into force-crash
Browse files Browse the repository at this point in the history
  • Loading branch information
robertomonteromiguel authored Jan 29, 2025
2 parents c9c8cda + c0550a0 commit c7185c8
Show file tree
Hide file tree
Showing 175 changed files with 5,878 additions and 1,801 deletions.
1 change: 1 addition & 0 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Install dependencies
description: Install dependencies
runs:
using: composite
steps: # retry in case of server error from registry
Expand Down
3 changes: 2 additions & 1 deletion .github/actions/node/14/action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Node 14
description: Install Node 14
runs:
using: composite
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '14'
3 changes: 2 additions & 1 deletion .github/actions/node/16/action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Node 16
description: Install Node 16
runs:
using: composite
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '16'
3 changes: 2 additions & 1 deletion .github/actions/node/18/action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Node 18
description: Install Node 18
runs:
using: composite
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '18'
3 changes: 2 additions & 1 deletion .github/actions/node/20/action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Node 20
description: Install Node 20
runs:
using: composite
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '20'
3 changes: 2 additions & 1 deletion .github/actions/node/latest/action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Node Latest
description: Install the latest Node.js version
runs:
using: composite
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '22' # Update this line to the latest Node.js version
3 changes: 2 additions & 1 deletion .github/actions/node/oldest/action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Node 18
description: Install Oldest Supported Node.js version
runs:
using: composite
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '18'
3 changes: 2 additions & 1 deletion .github/actions/node/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Node Setup
description: Install Node.js
runs:
using: composite
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: yarn
node-version: '18'
7 changes: 5 additions & 2 deletions .github/actions/plugins/test-and-upstream/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Plugin Tests
name: Plugin and Upstream Tests
description: Run plugin tests and upstream test suite
runs:
using: composite
steps:
Expand All @@ -15,6 +16,8 @@ runs:
shell: bash
- run: yarn test:plugins:upstream
shell: bash
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v5
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: test-and-upstream-${{ github.job }}
5 changes: 4 additions & 1 deletion .github/actions/plugins/test/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Plugin Tests
description: Run plugin tests
runs:
using: composite
steps:
Expand All @@ -11,6 +12,8 @@ runs:
- uses: ./.github/actions/node/latest
- run: yarn test:plugins:ci
shell: bash
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v5
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: test-${{ github.job }}
5 changes: 4 additions & 1 deletion .github/actions/plugins/upstream/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Plugin Upstream Tests
description: Run upstream test suite
runs:
using: composite
steps:
Expand All @@ -11,6 +12,8 @@ runs:
- uses: ./.github/actions/node/latest
- run: yarn test:plugins:upstream
shell: bash
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v5
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: upstream-${{ github.job }}
7 changes: 5 additions & 2 deletions .github/actions/testagent/logs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ inputs:
container-id:
description: "ID of the Docker Container to get logs from (optional)"
required: false
suffix:
description: "suffix of the artifact file name"
required: false
runs:
using: composite
steps:
Expand Down Expand Up @@ -34,7 +37,7 @@ runs:
rm "$headers"
shell: bash
- name: Archive Test Agent Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: supported-integrations
name: supported-integrations-${{inputs.suffix}}
path: ./artifacts
42 changes: 42 additions & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Actionlint

on:
pull_request:
push:
branches: [master]
schedule:
- cron: "0 4 * * *"

jobs:
actionlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/node/setup
# NOTE: Ok this next bit seems unnecessary, right? The problem is that
# this repo is currently incompatible with npm, at least with the
# devDependencies. While this is intended to be corrected, it hasn't yet,
# so the easiest thing to do here is just use a fresh package.json. This
# is needed because actionlint runs an `npm install` at the beginning.
- name: Clear package.json
run: |
rm package.json
npm init -y
- name: actionlint
id: actionlint
uses: raven-actions/actionlint@v2
with:
matcher: true
fail-on-error: true
shellcheck: false # TODO should we enable this?
- name: actionlint Summary
if: ${{ steps.actionlint.outputs.exit-code != 0 }}
run: |
echo "Used actionlint version ${{ steps.actionlint.outputs.version-semver }}"
echo "Used actionlint release ${{ steps.actionlint.outputs.version-tag }}"
echo "actionlint ended with ${{ steps.actionlint.outputs.exit-code }} exit code"
echo "actionlint ended because '${{ steps.actionlint.outputs.exit-message }}'"
echo "actionlint found ${{ steps.actionlint.outputs.total-errors }} errors"
echo "actionlint checked ${{ steps.actionlint.outputs.total-files }} files"
echo "actionlint cache used: ${{ steps.actionlint.outputs.cache-hit }}"
exit ${{ steps.actionlint.outputs.exit-code }}
2 changes: 2 additions & 0 deletions .github/workflows/all-green.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- master
schedule:
- cron: "0 4 * * *"

jobs:

Expand Down
67 changes: 50 additions & 17 deletions .github/workflows/appsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: ./.github/actions/node/setup
- uses: ./.github/actions/install
- run: yarn test:appsec:ci
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v5

ubuntu:
runs-on: ubuntu-latest
Expand All @@ -33,18 +33,18 @@ jobs:
- run: yarn test:appsec:ci
- uses: ./.github/actions/node/latest
- run: yarn test:appsec:ci
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v5

windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '18'
- uses: ./.github/actions/install
- run: yarn test:appsec:ci
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v5

ldapjs:
runs-on: ubuntu-latest
Expand All @@ -69,7 +69,7 @@ jobs:
- run: yarn test:appsec:plugins:ci
- uses: ./.github/actions/node/latest
- run: yarn test:appsec:plugins:ci
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v5

postgres:
runs-on: ubuntu-latest
Expand All @@ -94,7 +94,7 @@ jobs:
- run: yarn test:appsec:plugins:ci
- uses: ./.github/actions/node/20
- run: yarn test:appsec:plugins:ci
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v5

mysql:
runs-on: ubuntu-latest
Expand All @@ -117,7 +117,7 @@ jobs:
- run: yarn test:appsec:plugins:ci
- uses: ./.github/actions/node/20
- run: yarn test:appsec:plugins:ci
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v5

express:
runs-on: ubuntu-latest
Expand All @@ -131,7 +131,7 @@ jobs:
- run: yarn test:appsec:plugins:ci
- uses: ./.github/actions/node/latest
- run: yarn test:appsec:plugins:ci
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v5

graphql:
runs-on: ubuntu-latest
Expand All @@ -145,7 +145,7 @@ jobs:
- run: yarn test:appsec:plugins:ci
- uses: ./.github/actions/node/latest
- run: yarn test:appsec:plugins:ci
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v5

mongodb-core:
runs-on: ubuntu-latest
Expand All @@ -165,7 +165,7 @@ jobs:
- run: yarn test:appsec:plugins:ci
- uses: ./.github/actions/node/latest
- run: yarn test:appsec:plugins:ci
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v5

mongoose:
runs-on: ubuntu-latest
Expand All @@ -185,7 +185,7 @@ jobs:
- run: yarn test:appsec:plugins:ci
- uses: ./.github/actions/node/latest
- run: yarn test:appsec:plugins:ci
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v5

sourcing:
runs-on: ubuntu-latest
Expand All @@ -201,7 +201,7 @@ jobs:
- run: yarn test:appsec:plugins:ci
- uses: ./.github/actions/node/latest
- run: yarn test:appsec:plugins:ci
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v5

next:
strategy:
Expand All @@ -211,22 +211,41 @@ jobs:
- 18
- latest
range: ['>=10.2.0 <11', '>=11.0.0 <13', '11.1.4', '>=13.0.0 <14', '13.2.0', '>=14.0.0 <=14.2.6', '>=14.2.7 <15', '>=15.0.0']
include:
- range: '>=10.2.0 <11'
range_clean: gte.10.2.0.and.lt.11
- range: '>=11.0.0 <13'
range_clean: gte.11.0.0.and.lt.13
- range: '11.1.4'
range_clean: 11.1.4
- range: '>=13.0.0 <14'
range_clean: gte.13.0.0.and.lt.14
- range: '13.2.0'
range_clean: 13.2.0
- range: '>=14.0.0 <=14.2.6'
range_clean: gte.14.0.0.and.lte.14.2.6
- range: '>=14.2.7 <15'
range_clean: gte.14.2.7.and.lt.15
- range: '>=15.0.0'
range_clean: gte.15.0.0
runs-on: ubuntu-latest
env:
PLUGINS: next
PACKAGE_VERSION_RANGE: ${{ matrix.range }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/testagent/start
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: yarn
node-version: ${{ matrix.version }}
- uses: ./.github/actions/install
- run: yarn test:appsec:plugins:ci
- if: always()
uses: ./.github/actions/testagent/logs
- uses: codecov/codecov-action@v3
with:
suffix: appsec-${{ github.job }}-${{ matrix.version }}-${{ matrix.range_clean }}
- uses: codecov/codecov-action@v5

lodash:
runs-on: ubuntu-latest
Expand All @@ -240,7 +259,7 @@ jobs:
- run: yarn test:appsec:plugins:ci
- uses: ./.github/actions/node/latest
- run: yarn test:appsec:plugins:ci
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v5

integration:
runs-on: ubuntu-latest
Expand All @@ -264,7 +283,7 @@ jobs:
- run: yarn test:appsec:plugins:ci
- uses: ./.github/actions/node/latest
- run: yarn test:appsec:plugins:ci
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v5

template:
runs-on: ubuntu-latest
Expand All @@ -278,4 +297,18 @@ jobs:
- run: yarn test:appsec:plugins:ci
- uses: ./.github/actions/node/latest
- run: yarn test:appsec:plugins:ci
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v5

node-serialize:
runs-on: ubuntu-latest
env:
PLUGINS: node-serialize
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/node/setup
- uses: ./.github/actions/install
- uses: ./.github/actions/node/oldest
- run: yarn test:appsec:plugins:ci
- uses: ./.github/actions/node/latest
- run: yarn test:appsec:plugins:ci
- uses: codecov/codecov-action@v5
Loading

0 comments on commit c7185c8

Please sign in to comment.