Skip to content

Add llms.txt to describe this repo to our AI overlords 🤖 (#508) #1499

Add llms.txt to describe this repo to our AI overlords 🤖 (#508)

Add llms.txt to describe this repo to our AI overlords 🤖 (#508) #1499

Workflow file for this run

name: "Tests"
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
build: # make sure build/ci work properly and there is no faked build ncc built scripts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version-file: package.json
- run: npm ci
- run: npm run build
- run: git status --porcelain
- run: git diff --ws-error-highlight=all | cat -v
- run: git diff --exit-code
test:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- run: npm ci
- run: npm run test
test-download-action:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
path: ./
- name: "Donwload Grype v0.54.0"
id: grype
uses: ./download-grype # anchore/scan-action/download-grype
with:
grype-version: v0.54.0
- name: "Check Grype version before scan-action"
run: ${{ steps.grype.outputs.cmd }} version | egrep "^Version:.*0.54.0$"
- name: "Scan test image"
uses: ./
with:
image: "alpine:latest"
fail-build: false # to prevent fail due to vuln:s on test image
- name: "Check Grype version after scan-action"
run: ${{ steps.grype.outputs.cmd }} version | egrep "^Version:.*0.54.0$"
test-all:
strategy:
matrix:
config: [
{image: 'alpine:latest'},
{path: 'tests/fixtures/npm-project'},
{sbom: 'tests/fixtures/test_sbom.spdx.json'},
]
os: [ubuntu-latest, windows-latest, macos-latest]
output-format: [sarif, json, table]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ./
id: scan
with:
image: ${{ matrix.config.image }}
path: ${{ matrix.config.path }}
sbom: ${{ matrix.config.sbom }}
output-format: ${{ matrix.output-format }}
fail-build: false
- name: Validate file exists
if: ${{ matrix.output-format != 'table' }}
run: test -f '${{ steps.scan.outputs[matrix.output-format] }}'