-
Notifications
You must be signed in to change notification settings - Fork 449
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configuration: add global checks (#2)
- Loading branch information
1 parent
eb0661b
commit 30e3287
Showing
2 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
arrow-libs/integrations/.github/workflows/check_build_integration.yml
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,54 @@ | ||
name: "Check Build Integration" | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
check-build-integration: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Check | ||
run: | | ||
git clone https://github.com/arrow-kt/arrow.git arrow | ||
./arrow/scripts/check-build-integration.sh | ||
- name: Prepare environment to create the issue (new package) | ||
if: failure() | ||
id: create-issue | ||
run: | | ||
echo $(git log -1 --pretty=format:%s) | ||
echo ::set-output name=title::$(git log -1 --pretty=format:%s) | ||
echo -e "## Details\n" > issue.log | ||
echo -e "* **Commit hash**: \`$(git log -1 --pretty=format:%h)\`\n" >> issue.log | ||
echo -e "* **Author**: $(git log -1 --pretty=format:%an)\n" >> issue.log | ||
echo -e "* **Committer**: $(git log -1 --pretty=format:%cn)\n" >> issue.log | ||
echo -e "* **More info**: [error log](https://github.com/arrow-kt/arrow-integrations/commit/$GITHUB_SHA/checks)\n" >> issue.log | ||
cat issue.log | ||
rm -rf /home/runner/work/_actions/actions/github-script/0.3.0/node_modules | ||
cd /home/runner/work/_actions/actions/github-script/0.3.0/ | ||
npm install | ||
npm install xmlhttprequest | ||
- name: Create the issue | ||
if: failure() | ||
uses: actions/[email protected] | ||
with: | ||
github-token: ${{github.token}} | ||
script: | | ||
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; | ||
function readFile(file) { | ||
var content; | ||
var rawFile = new XMLHttpRequest(); | ||
rawFile.open("GET", file, false); | ||
rawFile.onreadystatechange = function () { | ||
content = rawFile.responseText; | ||
} | ||
rawFile.send(); | ||
return content; | ||
} | ||
await github.issues.create({...context.repo, | ||
title: "BUILD: error when integrating '${{ steps.create-issue.outputs.title }}' with the rest of Arrow libraries", | ||
body: readFile("file://${{github.workspace}}/issue.log")}); |
54 changes: 54 additions & 0 deletions
54
arrow-libs/integrations/.github/workflows/check_doc_integration.yml
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,54 @@ | ||
name: "Check Doc Integration" | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
check-doc-integration: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Check | ||
run: | | ||
git clone https://github.com/arrow-kt/arrow.git arrow | ||
./arrow/scripts/check-doc-integration.sh | ||
- name: Prepare environment to create the issue (new package) | ||
if: failure() | ||
id: create-issue | ||
run: | | ||
echo $(git log -1 --pretty=format:%s) | ||
echo ::set-output name=title::$(git log -1 --pretty=format:%s) | ||
echo -e "## Details\n" > issue.log | ||
echo -e "* **Commit hash**: \`$(git log -1 --pretty=format:%h)\`\n" >> issue.log | ||
echo -e "* **Author**: $(git log -1 --pretty=format:%an)\n" >> issue.log | ||
echo -e "* **Committer**: $(git log -1 --pretty=format:%cn)\n" >> issue.log | ||
echo -e "* **More info**: [error log](https://github.com/arrow-kt/arrow-integrations/commit/$GITHUB_SHA/checks)\n" >> issue.log | ||
cat issue.log | ||
rm -rf /home/runner/work/_actions/actions/github-script/0.3.0/node_modules | ||
cd /home/runner/work/_actions/actions/github-script/0.3.0/ | ||
npm install | ||
npm install xmlhttprequest | ||
- name: Create the issue | ||
if: failure() | ||
uses: actions/[email protected] | ||
with: | ||
github-token: ${{github.token}} | ||
script: | | ||
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; | ||
function readFile(file) { | ||
var content; | ||
var rawFile = new XMLHttpRequest(); | ||
rawFile.open("GET", file, false); | ||
rawFile.onreadystatechange = function () { | ||
content = rawFile.responseText; | ||
} | ||
rawFile.send(); | ||
return content; | ||
} | ||
await github.issues.create({...context.repo, | ||
title: "DOC: error when integrating '${{ steps.create-issue.outputs.title }}' with the rest of Arrow libraries", | ||
body: readFile("file://${{github.workspace}}/issue.log")}); |