-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update readme.md, add ci validate examples * Fix validate examples (#54) * fix validate-example.sh * rename ci title * add ci build-examples.sh * update ci.yml path * update path for run main.go * update path * update examples * update validate-examples.sh * update * update usage-logs docx * add go mod tidy * remove node-remove example * remove document comment example * remove mutiple chart from csv * remove line chart from csv example * remove comment-remove example * remove comment-list example * remove copy reorder slide * fix examples * add variable for commentId on comment-remove example * add presentation use template sales example
- Loading branch information
Showing
23 changed files
with
287 additions
and
67 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
cd $PWD | ||
go get github.com/go-ole/go-ole/oleutil@v1.3.0 | ||
go mod tidy | ||
|
||
:> build_errors | ||
find $PWD -maxdepth 2 -mindepth 1 -not -path '*/\.*' -type d -exec sh -c "cd {}; echo building {}; go build -tags=test main.go" 2>>build_log \; | ||
grep -v "^go: " build_log | grep -v main.go > build_errors | ||
if [[ $(wc -l build_errors | awk '{print $1}') == "0" ]]; then | ||
exit 0 | ||
fi | ||
echo BUILD ERRORS: | ||
cat build_errors | ||
echo END OF BUILD ERRORS. | ||
exit 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
output=$(dotnet ./openxml-validator/bin/Release/net8.0/Program.dll --$2 $1) | ||
echo $output | ||
echo "" | ||
if [[ $output == *"is not valid"* ]]; then | ||
if [[ $output != *"main:sz"* ]] && [[ $output != *"main:family"* ]] && [[ $output != *"chart:ext"* ]] ; then | ||
echo $output >> errors | ||
echo "" >> errors | ||
fi | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
values.xlsx | ||
chart.pptx | ||
lists.pptx | ||
picture.pptx | ||
several_slides.pptx | ||
table.pptx |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
:> errors | ||
output=$(find .. -maxdepth 2 -mindepth 2 -not -path '*/\.*' -type d ! -name "metered" ! -name "offline" ! -name "metered-non-persistent-cache" ! -name "usage-logs" -print0 | xargs -0 -I{} sh -c "cd {}; echo running {}; ./main") | ||
if [ $? -ne 0 ]; then | ||
echo $output >> errors | ||
fi | ||
export PATH=$PATH:$HOME/dotnet | ||
find .. -name "*.docx" $(printf "! -name %s " $(cat skip_files)) -exec ./dotnet_run.sh {} docx \; | ||
find .. -name "*.xlsx" $(printf "! -name %s " $(cat skip_files)) -exec ./dotnet_run.sh {} xlsx \; | ||
find .. -name "*.pptx" $(printf "! -name %s " $(cat skip_files)) -exec ./dotnet_run.sh {} pptx \; | ||
echo Errors: $(wc -l errors) | ||
if [[ $(wc -l errors | awk '{print $1}') == "0" ]]; then | ||
exit 0 | ||
fi | ||
|
||
echo "Validation errors" | ||
cat errors | ||
echo "EOF Validation errors" | ||
exit 1 |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: UniOffice Examples CI | ||
|
||
on: | ||
push: | ||
branches: [ master, development ] | ||
pull_request: | ||
branches: [ master, development ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
go-version: [ '1.23', '1.22', '1.21', '1.20', '1.19' ] | ||
|
||
env: | ||
CGO_ENABLED: 0 | ||
GITHUB_REF: ${{ github.ref }} | ||
UNIDOC_LICENSE_API_KEY: ${{ secrets.UNIDOC_LICENSE_API_KEY }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Golang ${{ matrix.go-version }} | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Fetch dotnet | ||
run: | | ||
mkdir -p $HOME/dotnet | ||
cd $HOME/dotnet | ||
wget https://download.visualstudio.microsoft.com/download/pr/4e3b04aa-c015-4e06-a42e-05f9f3c54ed2/74d1bb68e330eea13ecfc47f7cf9aeb7/dotnet-sdk-8.0.404-linux-x64.tar.gz | ||
tar -xf dotnet-sdk-8.0.404-linux-x64.tar.gz | ||
- name: Test and validate examples | ||
run: | | ||
export REPO=$PWD | ||
cd $REPO/.ci | ||
ls -la | ||
unzip validator.zip | ||
ls -la | ||
cd $REPO/.ci/openxml-validator | ||
$HOME/dotnet/dotnet build --configuration Release | ||
cd $REPO | ||
./.ci/build-examples.sh | ||
cd $REPO/.ci | ||
./validate-examples.sh | ||
if [ $? -ne 0 ] | ||
then exit 1 | ||
fi |
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 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
Binary file not shown.
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
Binary file not shown.
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
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
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
Oops, something went wrong.