@@ -45,3 +45,59 @@ Merges all given values.yaml files, each file overrides values from previous.
4545Extracts requested keys using provided .yq expressions.
4646
4747Writes results to $GITHUB_OUTPUT.
48+
49+ ## Test locally
50+
51+ If you want to make changes and test it locally, use [act](https://github.com/nektos/act), just:
52+
53+ ` ` ` bash
54+ act
55+ ```
56+
57+ You will get
58+ ``` text
59+ [test.yml/case-basic] ⭐ Run Set up job
60+ [test.yml/case-basic] 🚀 Start image=catthehacker/ubuntu:act-latest
61+ [test.yml/case-basic] 🐳 docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
62+ [test.yml/case-basic] 🐳 docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
63+ [test.yml/case-basic] 🐳 docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
64+ [test.yml/case-basic] 🐳 docker exec cmd=[node --no-warnings -e console.log(process.execPath)] user= workdir=
65+ [test.yml/case-basic] ✅ Success - Set up job
66+ [test.yml/case-basic] ☁ git clone 'https://github.com/nick-fields/assert-action' # ref=v2
67+ [test.yml/case-basic] ☁ git clone 'https://github.com/nick-fields/assert-action' # ref=v2
68+ [test.yml/case-basic] ⭐ Run Main checkout
69+ [test.yml/case-basic] 🐳 docker cp src=/Users/sasha/work/github.com/ton-studio/read-helm-values/. dst=/Users/sasha/work/github.com/ton-studio/read-helm-values
70+ [test.yml/case-basic] ✅ Success - Main checkout [79.149583ms]
71+ [test.yml/case-basic] ⭐ Run Main execute
72+ [test.yml/case-basic] ⭐ Run Main Install yq
73+ [test.yml/case-basic] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/execute-composite-0.sh] user= workdir=
74+ [test.yml/case-basic] ✅ Success - Main Install yq [132.91875ms]
75+ [test.yml/case-basic] ⭐ Run Main Extract Helm values
76+ [test.yml/case-basic] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/execute-composite-extract.sh] user= workdir=./tests/basic/
77+ | Read file: values.yml
78+ | Read file: values-override.yml
79+ | Parsed expression: key is 'app_name', value is '.appName'
80+ | Parsed expression: key is 'host', value is '.nginx.host'
81+ [test.yml/case-basic] ✅ Success - Main Extract Helm values [223.7465ms]
82+ [test.yml/case-basic] ⚙ ::set-output:: app_name=default
83+ [test.yml/case-basic] ⚙ ::set-output:: host=ton.org
84+ [test.yml/case-basic] ✅ Success - Main execute [680.500333ms]
85+ [test.yml/case-basic] ⚙ ::set-output:: app_name=default
86+ [test.yml/case-basic] ⚙ ::set-output:: host=ton.org
87+ [test.yml/case-basic] ⭐ Run Main validate result (app_name)
88+ [test.yml/case-basic] 🐳 docker cp src=/Users/sasha/.cache/act/nick-fields-assert-action@v2/ dst=/var/run/act/actions/nick-fields-assert-action@v2/
89+ [test.yml/case-basic] 🐳 docker exec cmd=[/opt/acttoolcache/node/18.20.8/arm64/bin/node /var/run/act/actions/nick-fields-assert-action@v2/dist/index.js] user= workdir=
90+ [test.yml/case-basic] ✅ Success - Main validate result (app_name) [261.016292ms]
91+ [test.yml/case-basic] ⚙ ::set-output:: result=passed
92+ [test.yml/case-basic] ⭐ Run Main validate result (host)
93+ [test.yml/case-basic] 🐳 docker cp src=/Users/sasha/.cache/act/nick-fields-assert-action@v2/ dst=/var/run/act/actions/nick-fields-assert-action@v2/
94+ [test.yml/case-basic] 🐳 docker exec cmd=[/opt/acttoolcache/node/18.20.8/arm64/bin/node /var/run/act/actions/nick-fields-assert-action@v2/dist/index.js] user= workdir=
95+ [test.yml/case-basic] ✅ Success - Main validate result (host) [161.4215ms]
96+ [test.yml/case-basic] ⚙ ::set-output:: result=passed
97+ [test.yml/case-basic] ⭐ Run Post execute
98+ [test.yml/case-basic] ✅ Success - Post execute [39.542µs]
99+ [test.yml/case-basic] ⭐ Run Complete job
100+ [test.yml/case-basic] Cleaning up container for job case-basic
101+ [test.yml/case-basic] ✅ Success - Complete job
102+ [test.yml/case-basic] 🏁 Job succeeded
103+ ```
0 commit comments