Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ jobs:
- name: Install latest npm cli
run: npm install -g npm@latest

# Skipping install since all assets are pre-built already
# - run: npm install

- name: Generate other schema file formats
- run: |
cd ./scripts
npm install
npm install --ignore-scripts
./yaml2json < ../schemas/v1.0/schema.yaml > ../schemas/v1.0/schema.json

- name: Publish package
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Run Tests

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Install latest npm cli
run: npm install -g npm@latest

- name: Install script dependencies
run: |
cd ./scripts
npm install --ignore-scripts

- name: Run schema tests
run: |
cd ./scripts
./test-schema ../schemas/v1.0/schema.yaml ../schemas/v1.0/tests

- name: Run schema conversion
run: |
cd ./scripts
./yaml2json < ../schemas/v1.0/schema.yaml > ../schemas/v1.0/schema.json
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
5 changes: 4 additions & 1 deletion scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"jsonpath-plus": "10.4.0",
"node-dir": "0.1.17",
"yaml": "2.8.3"
},
"scripts": {
"preinstall": "echo 'error: npm scripts are enabled; disable scripts or use npm install --ignore-scripts'; exit 1"
}
}
}
Loading