From 4e9df288e63e310bed8aef757b115357c1806808 Mon Sep 17 00:00:00 2001 From: Mark Crossfield Date: Mon, 30 Jan 2023 11:26:36 +0000 Subject: [PATCH 1/4] Be explicit about working directories for languages Fixes #93 --- docs/_posts/0000-02-04-ci-exercise.md | 35 +++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/docs/_posts/0000-02-04-ci-exercise.md b/docs/_posts/0000-02-04-ci-exercise.md index 5d45e99..1290d85 100644 --- a/docs/_posts/0000-02-04-ci-exercise.md +++ b/docs/_posts/0000-02-04-ci-exercise.md @@ -28,7 +28,18 @@ Note: -- -Java / Kotlin +Kotlin +```yaml +- name: Build with Gradle + uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 + with: + arguments: build + build-root-directory: exercises/kotlin +``` + +-- + +Java ```yaml - name: Build with Gradle uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 @@ -65,7 +76,27 @@ jobs: -- -Javascript / Typescript +JavaScript +```yaml +defaults: + run: + working-directory: exercises/javascript + +jobs: + ... + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + cache-dependency-path: 'exercises/typescript/package-lock.json' +``` + +-- + +TypeScript ```yaml defaults: run: From 4b166e14745c3cf51ad59f408a390d6e3cf83fd1 Mon Sep 17 00:00:00 2001 From: Mark Crossfield Date: Mon, 30 Jan 2023 11:27:37 +0000 Subject: [PATCH 2/4] Update instruction as per GitHub UI changes --- docs/_posts/0000-02-04-ci-exercise.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/_posts/0000-02-04-ci-exercise.md b/docs/_posts/0000-02-04-ci-exercise.md index 1290d85..c9ae905 100644 --- a/docs/_posts/0000-02-04-ci-exercise.md +++ b/docs/_posts/0000-02-04-ci-exercise.md @@ -11,7 +11,6 @@ Note: explain difference between forking and using a template. * Look at your fork of the repo at https://github.com * Select the 'Actions' tab -* Click the 'New workflow' button * Find the right workflow for your language (ask if you're not sure) * Click the 'Configure' button * You should see an online editor with a default YAML file loaded From 2d9f5ef3e3a6369f64128c249977e95baa66f8d3 Mon Sep 17 00:00:00 2001 From: Mark Crossfield Date: Mon, 30 Jan 2023 11:39:58 +0000 Subject: [PATCH 3/4] Specify which action to use Fixes #95 --- docs/_posts/0000-02-04-ci-exercise.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/_posts/0000-02-04-ci-exercise.md b/docs/_posts/0000-02-04-ci-exercise.md index c9ae905..60b66f2 100644 --- a/docs/_posts/0000-02-04-ci-exercise.md +++ b/docs/_posts/0000-02-04-ci-exercise.md @@ -11,7 +11,14 @@ Note: explain difference between forking and using a template. * Look at your fork of the repo at https://github.com * Select the 'Actions' tab -* Find the right workflow for your language (ask if you're not sure) +* Find the right workflow for your language from the table below +*** +| JavaScript | TypeScript | Java | Kotlin | PHP | C# | +|------------|------------|------------------|------------------|-----|------| +| Node.js | Node.js | Java with Gradle | Java with Gradle | PHP | .NET | + +*** + * Click the 'Configure' button * You should see an online editor with a default YAML file loaded From 883696f200a764f799b37df2253fa0c693aedf84 Mon Sep 17 00:00:00 2001 From: Mark Crossfield Date: Mon, 30 Jan 2023 11:45:09 +0000 Subject: [PATCH 4/4] Remove reference to PHP strict mode Fixes #92 --- docs/_posts/0000-02-04-ci-exercise.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/_posts/0000-02-04-ci-exercise.md b/docs/_posts/0000-02-04-ci-exercise.md index 60b66f2..e7b84c6 100644 --- a/docs/_posts/0000-02-04-ci-exercise.md +++ b/docs/_posts/0000-02-04-ci-exercise.md @@ -76,6 +76,9 @@ defaults: jobs: ... + - name: Validate composer.json and composer.lock + run: composer validate --no-check-publish + ... - name: Run test suite run: ./vendor/bin/phpunit --testdox tests ```