Update gradle.lockfile #112
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: "25" | |
| - uses: gradle/actions/setup-gradle@v6 | |
| - name: Check | |
| run: ./gradlew check | |
| action-integration: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: "25" | |
| - uses: gradle/actions/setup-gradle@v6 | |
| - name: Set Up Fixture Files | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| fixture_dir=".ci-action-fixture" | |
| mkdir -p "${fixture_dir}" | |
| cat > "${fixture_dir}/schema.rng" <<'EOF' | |
| <grammar xmlns="http://relaxng.org/ns/structure/1.0"> | |
| <start> | |
| <element name="root"> | |
| <empty/> | |
| </element> | |
| </start> | |
| </grammar> | |
| EOF | |
| cat > "${fixture_dir}/valid.xml" <<'EOF' | |
| <?xml version="1.0"?> | |
| <?xml-model href="schema.rng" schematypens="http://relaxng.org/ns/structure/1.0"?> | |
| <root/> | |
| EOF | |
| cat > "${fixture_dir}/manifest.txt" <<'EOF' | |
| .ci-action-fixture/valid.xml | |
| EOF | |
| - name: Run Local Action With Directory Input | |
| id: action-directory | |
| uses: ./ | |
| with: | |
| directory: .ci-action-fixture | |
| json_report_path: .ci-action-fixture/report.json | |
| jobs: 0 | |
| - name: Run Local Action With files_from Input | |
| uses: ./ | |
| with: | |
| files_from: .ci-action-fixture/manifest.txt | |
| jobs: 0 | |
| - name: Assert Action Outputs | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| test "${{ steps.action-directory.outputs.skipped }}" = "false" | |
| test "${{ steps.action-directory.outputs.files_checked }}" = "1" | |
| test "${{ steps.action-directory.outputs.failed_files }}" = "0" | |
| test "${{ steps.action-directory.outputs.warning_count }}" = "0" | |
| test "${{ steps.action-directory.outputs.json_report_path }}" = "${GITHUB_WORKSPACE}/.ci-action-fixture/report.json" | |
| test -f .ci-action-fixture/report.json | |
| jq -e '.summary.skipped == false' .ci-action-fixture/report.json >/dev/null | |
| jq -e '.summary.filesChecked == 1' .ci-action-fixture/report.json >/dev/null | |
| - name: Smoke Test changed_files_only for Push and Pull Request | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| tmpdir="$(mktemp -d)" | |
| repo="${tmpdir}/repo" | |
| mkdir -p "${repo}" | |
| cd "${repo}" | |
| git init -q | |
| git config user.name "CI" | |
| git config user.email "ci@example.com" | |
| cat > schema.rng <<'EOF' | |
| <grammar xmlns="http://relaxng.org/ns/structure/1.0"> | |
| <start> | |
| <element name="root"> | |
| <empty/> | |
| </element> | |
| </start> | |
| </grammar> | |
| EOF | |
| cat > valid.xml <<'EOF' | |
| <?xml version="1.0"?> | |
| <?xml-model href="schema.rng" schematypens="http://relaxng.org/ns/structure/1.0"?> | |
| <root/> | |
| EOF | |
| git add schema.rng valid.xml | |
| git commit -qm "Base XML" | |
| cat > "${repo}/changed.xml" <<'EOF' | |
| <?xml version="1.0"?> | |
| <?xml-model href="schema.rng" schematypens="http://relaxng.org/ns/structure/1.0"?> | |
| <root/> | |
| EOF | |
| before_sha="$(git rev-parse HEAD)" | |
| git add changed.xml | |
| git commit -qm "Changed XML" | |
| cat > "${tmpdir}/push-event.json" <<EOF | |
| {"before":"${before_sha}"} | |
| EOF | |
| XML_MODEL_VALIDATOR_WORKSPACE="${repo}" \ | |
| XML_MODEL_VALIDATOR_CACHE_HOME="${tmpdir}/cache" \ | |
| XML_MODEL_VALIDATOR_INPUT_CHANGED_FILES_ONLY="true" \ | |
| XML_MODEL_VALIDATOR_INPUT_CHANGED_SOURCE="git" \ | |
| GITHUB_EVENT_NAME="push" \ | |
| GITHUB_SHA="$(git rev-parse HEAD)" \ | |
| GITHUB_EVENT_PATH="${tmpdir}/push-event.json" \ | |
| XML_MODEL_VALIDATOR_INPUT_JOBS="0" \ | |
| bash "${GITHUB_WORKSPACE}/entrypoint.sh" | |
| origin_repo="${tmpdir}/origin.git" | |
| pr_repo="${tmpdir}/pr-repo" | |
| git init -q --bare "${origin_repo}" | |
| git clone -q "${origin_repo}" "${pr_repo}" 2>/dev/null | |
| cd "${pr_repo}" | |
| git config user.name "CI" | |
| git config user.email "ci@example.com" | |
| git checkout -qb main | |
| cat > schema.rng <<'EOF' | |
| <grammar xmlns="http://relaxng.org/ns/structure/1.0"> | |
| <start> | |
| <element name="root"> | |
| <empty/> | |
| </element> | |
| </start> | |
| </grammar> | |
| EOF | |
| cat > base.xml <<'EOF' | |
| <?xml version="1.0"?> | |
| <?xml-model href="schema.rng" schematypens="http://relaxng.org/ns/structure/1.0"?> | |
| <wrong/> | |
| EOF | |
| git add schema.rng base.xml | |
| git commit -qm "Base branch" | |
| git push -q -u origin main | |
| git checkout -qb feature | |
| cat > pr-changed.xml <<'EOF' | |
| <?xml version="1.0"?> | |
| <?xml-model href="schema.rng" schematypens="http://relaxng.org/ns/structure/1.0"?> | |
| <root/> | |
| EOF | |
| echo note > note.txt | |
| git add pr-changed.xml note.txt | |
| git commit -qm "Feature branch" | |
| XML_MODEL_VALIDATOR_WORKSPACE="${pr_repo}" \ | |
| XML_MODEL_VALIDATOR_CACHE_HOME="${tmpdir}/cache" \ | |
| XML_MODEL_VALIDATOR_INPUT_CHANGED_FILES_ONLY="true" \ | |
| XML_MODEL_VALIDATOR_INPUT_CHANGED_SOURCE="git" \ | |
| GITHUB_EVENT_NAME="pull_request" \ | |
| GITHUB_BASE_REF="main" \ | |
| GITHUB_SHA="$(git rev-parse HEAD)" \ | |
| XML_MODEL_VALIDATOR_INPUT_JOBS="0" \ | |
| bash "${GITHUB_WORKSPACE}/entrypoint.sh" |