add urldecode function (#1234) #1
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
# This workflow runs on pull requests to ensure that the snapshots produced by | |
# the equivalence tests are consistent with the snapshots that are checked in. | |
# | |
# If there is an inconsistency, it is the responsibility of the committer to | |
# review it, ensure that any changes are intentional, and then commit the new | |
# snapshots. | |
name: Snapshots | |
on: | |
pull_request: | |
jobs: | |
compare: | |
name: Compare | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: { go-version: '1.20' } | |
- name: Get the equivalence test binary | |
run: | | |
./.github/scripts/equivalence-test.sh download_equivalence_test_binary \ | |
0.4.0 \ | |
./bin/equivalence-testing \ | |
linux \ | |
amd64 | |
- name: Build the OpenTofu binary | |
run: | | |
go build -o ./bin/tofu ./cmd/tofu | |
- name: Run the equivalence tests | |
run: | | |
./bin/equivalence-testing update \ | |
--tests=testing/equivalence-tests/tests \ | |
--goldens=testing/equivalence-tests/outputs \ | |
--rewrites=testing/rewrites.jsonc \ | |
--binary=./bin/tofu \ | |
- name: Ensure there is no diff | |
shell: bash | |
run: | | |
changed=$(git diff --quiet -- testing/equivalence-tests/outputs || echo true) | |
if [[ "$changed" == "true" ]]; then | |
echo "Found changes, please commit the new golden files." | |
git diff -- testing/equivalence-tests/outputs | |
exit 1 | |
else | |
echo "Found no changes." | |
fi |