Bump the npm-updates group with 7 updates #620
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'build-test' | |
on: # rebuild any PRs and main branch changes | |
pull_request: | |
push: | |
branches: | |
- main | |
- 'releases/*' | |
permissions: | |
contents: read | |
jobs: | |
build: # make sure build/ci works properly | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ runner.os }}-node- | |
- run: | | |
npm ci | |
npm run all | |
test: # make sure the action works on a clean machine without building | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: ./ | |
id: store-json | |
with: | |
json: '{"foo": "test"}' | |
filename: 'test.json' | |
# todo: add test that checks with additional quotes in the value | |
- shell: pwsh | |
name: test the file content | |
run: | | |
$content = Get-Content -Path 'test.json' | |
Write-Host "Found this content in the file:" | |
Write-Host $content | |
$test = $content | ConvertFrom-Json | |
if ($test.foo -eq 'test') { | |
Write-Host "File found correct" | |
} | |
else { | |
Write-Host "Found this json:" | |
Write-Host $test | ConvertTo-Json | |
} |