Shanedell commented on code in PR #110:
URL: https://github.com/apache/daffodil-vscode/pull/110#discussion_r867274213
##########
.github/workflows/CI.yml:
##########
@@ -14,41 +14,79 @@
# limitations under the License.
---
-name: Code Formatting
+name: Daffodil CI
on:
push:
branches-ignore: [ 'dependabot/**' ]
pull_request:
types: [opened, synchronize, reopened]
jobs:
- ts-format:
- name: TypeScript Formatting
+ single-commit:
+ name: Single Commit Pull Request
+ if: github.event_name == 'pull_request'
runs-on: ubuntu-20.04
steps:
- - uses: actions/[email protected]
- - name: Setup Node
- uses: actions/[email protected]
+ - name: Check Single Commit
+ uses: actions/[email protected]
with:
- node-version: '16'
- - run: yarn install
- - run: yarn lint
+ script: |
+ const commits = await github.rest.pulls.listCommits({
+ ...context.repo,
+ pull_number: context.issue.number,
+ });
+ core.info("Number of commits in this pull request: " +
commits.data.length);
+ if (commits.data.length > 1) {
+ core.setFailed("If approved with two +1's, squash this pull
request into one commit");
+ }
- scala-format:
- name: Scala Formatting
+ format-rat-check:
+ name: TypeScript/Scala Formatting and Rat Check
runs-on: ubuntu-20.04
defaults:
run:
shell: bash
env:
SBT: sbt -J-Xms1024m -J-Xmx5120m -J-XX:ReservedCodeCacheSize=512m
-J-XX:MaxMetaspaceSize=1024m ++2.12.13
-
+
steps:
- uses: actions/[email protected]
+ - name: Setup Node
+ uses: actions/[email protected]
+ with:
+ node-version: '16'
- name: Setup Java
uses: actions/[email protected]
with:
distribution: temurin
java-version: 11
- run: $SBT scalafmtCheck
- run: $SBT scalafmtSbtCheck
+ - run: yarn install
+ - run: yarn lint
+ - name: Run Rat Check
+ run: $SBT ratCheck || (cat target/rat.txt; exit 1)
+
+ build-test-package:
+ name: Build, Test, and Package
+ strategy:
+ matrix:
+ os: [macos-11, ubuntu-20.04, windows-2019]
+ node: [ '10', '12', '14', '16' ]
Review Comment:
@stevedlawrence @mbeckerle Do you think the amount of versions for node used
could be lowered? I was thinking maybe just the hightest and lowest, so `[
'10', '16']` so the amount of time this job is ran goes from 12 to 6.
##########
.github/workflows/CI.yml:
##########
@@ -14,41 +14,79 @@
# limitations under the License.
---
-name: Code Formatting
+name: Daffodil CI
Review Comment:
Change this to be `Daffodil VS Code CI`
##########
.github/workflows/CI.yml:
##########
@@ -14,41 +14,79 @@
# limitations under the License.
---
-name: Code Formatting
+name: Daffodil CI
on:
push:
branches-ignore: [ 'dependabot/**' ]
pull_request:
types: [opened, synchronize, reopened]
jobs:
- ts-format:
- name: TypeScript Formatting
+ single-commit:
+ name: Single Commit Pull Request
+ if: github.event_name == 'pull_request'
runs-on: ubuntu-20.04
steps:
- - uses: actions/[email protected]
- - name: Setup Node
- uses: actions/[email protected]
+ - name: Check Single Commit
+ uses: actions/[email protected]
with:
- node-version: '16'
- - run: yarn install
- - run: yarn lint
+ script: |
+ const commits = await github.rest.pulls.listCommits({
+ ...context.repo,
+ pull_number: context.issue.number,
+ });
+ core.info("Number of commits in this pull request: " +
commits.data.length);
+ if (commits.data.length > 1) {
+ core.setFailed("If approved with two +1's, squash this pull
request into one commit");
+ }
- scala-format:
- name: Scala Formatting
+ format-rat-check:
Review Comment:
Having the TypeScript and Scala formatting in one job I think is fine but
the ratCheck should its own separate stage.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]