Merge pull request #775 from milesziemer/use-util-stream #40
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
name: ci | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
name: Java ${{ matrix.java }} ${{ matrix.os }} | |
strategy: | |
matrix: | |
java: [17] | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: gradle/wrapper-validation-action@v1 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'corretto' | |
- name: clean and build | |
run: ./gradlew clean build -Plog-tests | |
lint-typescript: | |
runs-on: ubuntu-latest | |
name: TypeScript Lint | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Install dependencies | |
run: yarn | |
- name: Run eslint | |
run: yarn lint --concurrency=3 | |
test-typescript: | |
runs-on: ubuntu-latest | |
name: TypeScript Test | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '14' | |
- name: Install dependencies | |
run: yarn | |
- name: Build packages | |
run: yarn build --concurrency=2 | |
- name: Run tests | |
run: yarn workspaces foreach --exclude smithy-typescript -v run test | |
ensure-typescript-formatted: | |
runs-on: ubuntu-latest | |
name: Ensure TypeScript is formatted | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Install dependencies | |
run: yarn | |
- name: Run the code formatter | |
run: yarn format | |
# This checks the output of git diff. If it's not empty (i.e there were | |
# changes) it'll return a non-zero error code. | |
- name: Ensure there are no changes from running the formatter | |
run: test -z "$(git diff)" | |
ensure-typescript-packages-have-changesets: | |
runs-on: ubuntu-latest | |
name: Ensure TypeScript packages have changesets | |
steps: | |
- uses: actions/checkout@v3 | |
# Include full git history needed for `yarn changeset status` | |
with: | |
ref: ${{github.event.pull_request.head.sha}} | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install | |
run: yarn | |
- name: Create empty changeset for ssdk libs | |
run: | | |
echo --- >> .changeset/empty-ssdk-changeset.md | |
echo '"@aws-smithy/server-apigateway": patch' >> .changeset/empty-ssdk-changeset.md | |
echo '"@aws-smithy/server-common": patch' >> .changeset/empty-ssdk-changeset.md | |
echo '"@aws-smithy/server-node": patch' >> .changeset/empty-ssdk-changeset.md | |
echo --- >> .changeset/empty-ssdk-changeset.md | |
echo "" >> .changeset/empty-ssdk-changeset.md | |
echo "empty changeset" >> .changeset/empty-ssdk-changeset.md | |
git config --global user.email "[email protected]" | |
git config --global user.name "Smithy Automation" | |
git add . | |
git commit -m "Create empty changeset" | |
- name: Ensure changesets exist for each changed package | |
run: yarn changeset status --since=origin/main |