Skip to content

Commit

Permalink
fix(ci): toc on ci
Browse files Browse the repository at this point in the history
watch defaul token permissions
  • Loading branch information
duncdrum committed Feb 1, 2024
1 parent 416a86b commit 99307f8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,30 @@ jobs:
- name: Install Test Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libxml2-utils bats
sudo apt-get install -y libxml2-utils bats libsaxonhe-java
# - name: Where is Saxon
# run: dpkg -L libsaxonhe-java
- name: Create Toc
run: |
mkdir -p frus-toc
java -jar /usr/share/java/Saxon-HE.jar -s:volumes/ -xsl:modules/lib/frus-toc.xsl -o:frus-toc/ -it:main
- name: What happened
run: git status

# sanity check
# TODO(DP) Validate ?
- name: Ensure all XML files are well-formed
run: |
xmllint --noout \
$(find . -type f -name '*.xml')
# Commit Toc files
- name: Commit and Push
if: ${{ matrix.java-version == 17}}
uses: actions-x/commit@v6
with:
message: "fix(toc): update [skip ci]"

# Build
- name: Build Expath Package
uses: actions/setup-java@v4
Expand Down
5 changes: 0 additions & 5 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@
<exclude name="tests/bats/**"/>
<exclude name="node_modules/**"/>
<exclude name=".notes/**"/>
<!-- DP: Temporary -->
<exclude name="volumes/frus187*.xml"/>
<exclude name="volumes/frus188*.xml"/>
<exclude name="volumes/frus189*.xml"/>
<exclude name="volumes/frus19*.xml"/>
</zip>
<echo>Version: ${app.version}</echo>
</target>
Expand Down
9 changes: 4 additions & 5 deletions tests/bats/smoke-test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@
[ "$result" == 'http://history.state.gov/ns/data/frus' ]
}

# Too many Errors by trigger.xqm to be useful
# @test "logs are error free" {
# result=$(docker logs exist | grep -ow -c 'ERROR' || true)
# [ "$result" -eq 0 ]
# }
@test "logs are error free" {
result=$(docker logs exist | grep -ow -c 'ERROR' || true)
[ "$result" -eq 0 ]
}

@test "no fatalities in logs" {
result=$(docker logs exist | grep -ow -c 'FATAL' || true)
Expand Down

0 comments on commit 99307f8

Please sign in to comment.