This repository was archived by the owner on Oct 7, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 126
Merged
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
09b5e2a
Add improvement
gantunesr 76abb13
Solve conflicts
gantunesr a4b2b2d
Bump jest
gantunesr f599c2d
Update workflow build-lint-test
gantunesr 0519854
Remove workflow_call
gantunesr ac95914
Ignore TS errors
gantunesr e238246
Add last line
gantunesr 24cc8c5
Add main workflow
gantunesr cb6732e
Rename file
gantunesr 4ffc57d
Set jest to 29.0.0
gantunesr 3c764d4
Revert yarn.lock
gantunesr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| name: Build, Lint, and Test | ||
|
|
||
| on: | ||
| workflow_call: | ||
|
|
||
| jobs: | ||
| prepare: | ||
| name: Prepare | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Use Node.js | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version-file: '.nvmrc' | ||
| cache: 'yarn' | ||
| - name: Install Yarn dependencies | ||
| run: yarn --immutable | ||
|
|
||
| build: | ||
| name: Build | ||
| runs-on: ubuntu-latest | ||
| needs: | ||
| - prepare | ||
| strategy: | ||
| matrix: | ||
| node-version: [14.x, 16.x, 18.x, 19.x] | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| cache: 'yarn' | ||
| - run: yarn --immutable --immutable-cache | ||
| - run: yarn build | ||
| - name: Require clean working directory | ||
| shell: bash | ||
| run: | | ||
| if ! git diff --exit-code; then | ||
| echo "Working tree dirty at end of job" | ||
| exit 1 | ||
| fi | ||
|
|
||
| lint: | ||
| name: Lint | ||
| runs-on: ubuntu-latest | ||
| needs: | ||
| - prepare | ||
| strategy: | ||
| matrix: | ||
| node-version: [14.x, 16.x, 18.x, 19.x] | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| cache: 'yarn' | ||
| - run: yarn --immutable --immutable-cache | ||
| - run: yarn lint | ||
| - name: Validate RC changelog | ||
| if: ${{ startsWith(github.head_ref, 'release/') }} | ||
| run: yarn auto-changelog validate --rc | ||
| - name: Validate changelog | ||
| if: ${{ !startsWith(github.head_ref, 'release/') }} | ||
| run: yarn auto-changelog validate | ||
| - name: Require clean working directory | ||
| shell: bash | ||
| run: | | ||
| if ! git diff --exit-code; then | ||
| echo "Working tree dirty at end of job" | ||
| exit 1 | ||
| fi | ||
|
|
||
| test: | ||
| name: Test | ||
| runs-on: ubuntu-latest | ||
| needs: | ||
| - prepare | ||
| strategy: | ||
| matrix: | ||
| node-version: [14.x, 16.x, 18.x, 19.x] | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| cache: 'yarn' | ||
| - run: yarn --immutable --immutable-cache | ||
| - run: yarn test | ||
| - name: Require clean working directory | ||
| shell: bash | ||
| run: | | ||
| if ! git diff --exit-code; then | ||
| echo "Working tree dirty at end of job" | ||
| exit 1 | ||
| fi |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: Main | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| check-workflows: | ||
| name: Check workflows | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Download actionlint | ||
| id: download-actionlint | ||
| run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/7fdc9630cc360ea1a469eed64ac6d78caeda1234/scripts/download-actionlint.bash) 1.6.23 | ||
| shell: bash | ||
| - name: Check workflow files | ||
| run: ${{ steps.download-actionlint.outputs.executable }} -color | ||
| shell: bash | ||
|
|
||
| build-lint-test: | ||
| name: Build, lint, and test | ||
| uses: ./.github/workflows/build-lint-test.yml | ||
|
|
||
| all-jobs-completed: | ||
| name: All jobs completed | ||
| runs-on: ubuntu-latest | ||
| needs: | ||
| - build-lint-test | ||
| outputs: | ||
| PASSED: ${{ steps.set-output.outputs.PASSED }} | ||
| steps: | ||
| - name: Set PASSED output | ||
| id: set-output | ||
| run: echo "PASSED=true" >> "$GITHUB_OUTPUT" | ||
|
|
||
| all-jobs-pass: | ||
| name: All jobs pass | ||
| if: ${{ always() }} | ||
| runs-on: ubuntu-latest | ||
| needs: all-jobs-completed | ||
| steps: | ||
| - name: Check that all jobs have passed | ||
| run: | | ||
| passed="${{ needs.all-jobs-completed.outputs.PASSED }}" | ||
| if [[ $passed != "true" ]]; then | ||
| exit 1 | ||
| fi |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.