Skip to content

Commit 963b79d

Browse files
Merge pull request #131 from MarcelDiessner/feature/syntaxChecking
Patch Feature/syntaxChecking
2 parents 5c19982 + a80d343 commit 963b79d

4 files changed

Lines changed: 15 additions & 9 deletions

File tree

.github/workflows/syntaxCheckPullRequest.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ jobs:
1919
- name: Select Changed Files
2020
id: changedfiles
2121
run: |
22-
changedFiles=`node selectChangedFiles.js`
23-
echo "${changedFiles}"
24-
echo "::set-output name=all::$changedFiles"
22+
node selectChangedFiles.js
2523
- name: Setup matrix combinations
2624
id: setup-matrix-combinations
2725
run: |
2826
dirs=()
29-
for changed_file in ${{ steps.changedfiles.outputs.all }}; do
27+
for changed_file in ${{ steps.changedfiles.outputs.changedFiles }}; do
3028
dir="$(echo $changed_file | cut -d/ -f1)"
3129
if [[ ! " ${dirs[@]} " =~ " ${dir} " ]]; then
3230
MATRIX_PARAMS_COMBINATIONS=$MATRIX_PARAMS_COMBINATIONS'{"tutorial": "'$dir'"},'
@@ -47,7 +45,6 @@ jobs:
4745
uses: actions/checkout@v2
4846
with:
4947
repository: devonfw-tutorials/tutorial-compiler
50-
path: tutorial-compiler
5148

5249
- name: Checkout playbooks
5350
uses: actions/checkout@v2
@@ -64,7 +61,8 @@ jobs:
6461
run: npm install
6562

6663
- name: run buildRun.sh --user ${{ github.actor }} --branch ${{ github.event.pull_request_target.head.ref }} --checkSyntax
67-
run: sh buildRun.sh --user ${{ github.actor }} --branch ${{ github.event.pull_request_target.head.ref }} --checkSyntax -p ${{ matrix.tutorial }} -e test_console
64+
run: |
65+
sh buildRun.sh --user ${{ github.actor }} --branch ${{ github.event.pull_request_target.head.ref }} --checkSyntax -p ${{ matrix.tutorial }} -e test_console
6866
6967
- name: Check error file existence
7068
id: check_files

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"dependencies": {
66
"pegjs": "^0.10.0",
77
"rimraf": "^3.0.2",
8-
"@octokit/core": "^3.2.3"
8+
"@octokit/core": "^3.2.3",
9+
"@actions/core": "^1.2.2"
910
},
1011
"author": "",
1112
"license": "ISC"

selectChangedFiles.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const path = require("path");
1+
const core = require("@actions/core");
22
const { Octokit } = require("@octokit/core");
33
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN });
44

@@ -18,7 +18,9 @@ async function selectChangedFiles() {
1818
} catch(e) {
1919
throw e;
2020
}
21-
return arr;
21+
let output = arr.join(' ');
22+
core.info(`Changed Files: ${output}`);
23+
core.setOutput('changedFiles', output);
2224
}
2325

2426
selectChangedFiles().catch(err => {

0 commit comments

Comments
 (0)