Skip to content

Update .github/workflows/test.yml #97

Update .github/workflows/test.yml

Update .github/workflows/test.yml #97

Workflow file for this run

name: "units-test"
on:
pull_request:
push:
branches:
- main
- v*
- 'releases/*'
jobs:
# unit tests
units:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci
- run: npm test
- name: Test query=nginx
uses: ./
with:
search: nginx
- name: Test query=nginx, limit=10
uses: ./
with:
search: nginx
limit: 10
- name: Test query=nginx, date=2024
uses: ./
with:
search: nginx
date: 2024
- name: Test query=nginx, version=1.22
uses: ./
with:
search: nginx
version: 1.22
- name: Test query=nginx, date=2024, version=1.22
uses: ./
with:
search: nginx
date: 2024
version: 1.22
# test action works running from the graph
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: release
uses: ./
with:
search: nginx
date: 2024
outputs:
matrix: ${{ steps.release.outputs.matrix }}
matrix:
runs-on: ubuntu-latest
needs: generate
strategy:
matrix: ${{ fromJson(needs.generate.outputs.matrix) }}
steps:
- run: echo "Build ${{ matrix.version }}"