fix
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
name: Merge me!
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
|
||||
jobs:
|
||||
merge-me:
|
||||
name: Merge me!
|
||||
if: github.actor == 'dependabot[bot]'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Merge me!
|
||||
uses: ahmadnassri/action-dependabot-auto-merge@v2
|
||||
with:
|
||||
target: minor
|
||||
github-token: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
|
||||
command: squash and merge
|
||||
@@ -0,0 +1,20 @@
|
||||
name: Security scan for docker image
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '30 4 * * *'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Run Trivy vulnerability scanner
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
image-ref: 'docker.io/swaggerapi/swagger-ui:unstable'
|
||||
format: 'table'
|
||||
exit-code: '1'
|
||||
ignore-unfixed: true
|
||||
vuln-type: 'os,library'
|
||||
severity: 'CRITICAL,HIGH'
|
||||
@@ -0,0 +1,83 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: Node.js CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
env:
|
||||
CYPRESS_CACHE_FOLDER: cypress/cache
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node.js 16.x
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: Cache Node Modules and Cypress binary
|
||||
uses: actions/cache@v3
|
||||
id: cache-primes
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
${{ env.CYPRESS_CACHE_FOLDER }}
|
||||
key: ${{ runner.os }}-node-and-cypress-${{ hashFiles('package-lock.json') }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.cache-primes.outputs.cache-hit != 'true'
|
||||
run: npm ci
|
||||
|
||||
- name: Lint code for errors only
|
||||
run: npm run lint-errors
|
||||
|
||||
- name: Run all tests
|
||||
run: npm run just-test-in-node && npm run test:unit-jest
|
||||
env:
|
||||
CI: true
|
||||
|
||||
- name: Build SwaggerUI
|
||||
run: npm run build
|
||||
|
||||
- name: Test build artifacts
|
||||
run: npm run test:artifact
|
||||
|
||||
e2e-tests:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
containers: ['+(a11y|security|bugs)/**/*.js', 'features/**/+(o|d)*.js', 'features/**/m*.js', 'features/**/!(o|d|m)*.js']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node.js 16.x
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: Cache Node Modules and Cypress binary
|
||||
uses: actions/cache@v3
|
||||
id: cache-primes
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
${{ env.CYPRESS_CACHE_FOLDER }}
|
||||
key: ${{ runner.os }}-node-and-cypress-${{ hashFiles('package-lock.json') }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.cache-primes.outputs.cache-hit != 'true'
|
||||
run: npm ci
|
||||
|
||||
- name: Cypress Test
|
||||
run: npx start-server-and-test cy:start http://localhost:3204 'npm run cy:run -- --spec "test/e2e-cypress/tests/${{ matrix.containers }}"'
|
||||
Reference in New Issue
Block a user