Shanedell commented on code in PR #110:
URL: https://github.com/apache/daffodil-vscode/pull/110#discussion_r868609015
##########
.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:
I think it all depends on the version of VS Code you have. For example, mine
says it uses nodejs 16 but someone could not be as up to date so it uses nodejs
14 so maybe just keep the two latest version to test?
--
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]