This repository was archived by the owner on Mar 21, 2025. It is now read-only.
Bump ws from 7.4.6 to 7.5.10 (#18) #44
This file contains hidden or 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: test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
unit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: yarn install | |
- run: yarn run lint | |
- run: yarn test | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./ | |
id: object | |
with: | |
output_properties: 'true' | |
patterns: | | |
- test/assets/conf1.yml | |
- test/assets/a/**/conf1.yml | |
- test/assets/b/**/conf1.yml | |
- run: echo '${{ steps.object.outputs.result }}' | |
- if: ${{ steps.object.outputs.result != '{"test":"b1"}' }} | |
run: 'false' | |
- if: ${{ steps.object.outputs.test != 'b1' }} | |
run: 'false' | |
- uses: ./ | |
id: array | |
with: | |
patterns: | | |
- test/assets/**/conf2.yml | |
- run: echo '${{ steps.array.outputs.result }}' | |
- if: ${{ steps.array.outputs.result != '["root2","a2","b2","c2"]' }} | |
run: 'false' | |
- uses: ./ | |
id: plain | |
with: | |
patterns: test/assets/**/file.txt | |
- run: echo '${{ steps.plain.outputs.result }}' | |
- if: ${{ toJSON(steps.plain.outputs.result) != '"root\ntestA\ntestB\n"' }} | |
run: 'false' | |
- uses: ./ | |
id: loop | |
with: | |
output_properties: 'true' | |
patterns: | | |
- test/assets/conf1.yml | |
- test/assets/{{ item }}/conf1.yml | |
loop: | | |
a | |
a/c | |
b | |
- run: echo '${{ steps.loop.outputs.result }}' | |
- if: ${{ steps.loop.outputs.result != '{"a":{"test":"a1"},"a/c":{"test":"c1"},"b":{"test":"b1"}}' }} | |
run: 'false' | |
- if: ${{ steps.loop.outputs.a != '{"test":"a1"}' }} | |
run: 'false' | |
- if: ${{ steps.loop.outputs.a_c != '{"test":"c1"}' }} | |
run: 'false' | |
- if: ${{ steps.loop.outputs.b != '{"test":"b1"}' }} | |
run: 'false' | |
- uses: ./ | |
id: loop-json | |
with: | |
output_properties: 'true' | |
patterns: | | |
- test/assets/conf1.yml | |
- test/assets/{{ item }}/conf1.yml | |
loop: '["a","a/c","b"]' | |
loop_items_format: json | |
- run: echo '${{ steps.loop-json.outputs.result }}' | |
- if: ${{ steps.loop-json.outputs.result != '{"a":{"test":"a1"},"a/c":{"test":"c1"},"b":{"test":"b1"}}' }} | |
run: 'false' | |
- if: ${{ steps.loop-json.outputs.a != '{"test":"a1"}' }} | |
run: 'false' | |
- if: ${{ steps.loop-json.outputs.a_c != '{"test":"c1"}' }} | |
run: 'false' | |
- if: ${{ steps.loop-json.outputs.b != '{"test":"b1"}' }} | |
run: 'false' | |
- uses: ./ | |
id: loop-deep-yaml | |
with: | |
output_properties: 'true' | |
patterns: | | |
- test/assets/{{ item.name }}.yml | |
- test/assets/{{ item.path }}/{{ item.name }}.yml | |
loop: | | |
- path: a | |
name: conf1 | |
- path: a/c | |
name: conf1 | |
- path: b | |
name: conf1 | |
loop_items_format: yaml | |
loop_items_key: path | |
- run: echo '${{ steps.loop-deep-yaml.outputs.result }}' | |
- if: ${{ steps.loop-deep-yaml.outputs.result != '{"a":{"test":"a1"},"a/c":{"test":"c1"},"b":{"test":"b1"}}' }} | |
run: 'false' | |
- if: ${{ steps.loop-deep-yaml.outputs.a != '{"test":"a1"}' }} | |
run: 'false' | |
- if: ${{ steps.loop-deep-yaml.outputs.a_c != '{"test":"c1"}' }} | |
run: 'false' | |
- if: ${{ steps.loop-deep-yaml.outputs.b != '{"test":"b1"}' }} | |
run: 'false' |