feat: update node version and libraries #63
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
on: [push, workflow_dispatch] | |
name: Test | |
env: | |
MY_NAME: testUser | |
jobs: | |
webrequest_test: | |
runs-on: ubuntu-latest | |
name: Test POST and GET web requests | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node for testing | |
uses: actions/setup-node@master | |
- run: npm install | |
- run: npm test | |
- name: post-request output | |
shell: pwsh | |
run: | | |
$output = '${{ steps.post-request.outputs.output }}' | ConvertFrom-Json | |
Write-Host "Time from output $($output.time) statusCode $($output.statusCode)" | |
$output.statusCode -eq 200 | |
- name: GET request | |
id: get-request | |
uses: satak/webrequest-action@master | |
with: | |
url: https://my-json-server.typicode.com/typicode/demo/posts | |
method: GET | |
- name: get-request output | |
shell: pwsh | |
run: | | |
$output = '${{ steps.get-request.outputs.output }}' | ConvertFrom-Json | |
$output.data[0].id -eq 1 |