-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: setup realtime build and pr checks
- Loading branch information
1 parent
52bacc4
commit 6a1d697
Showing
6 changed files
with
102 additions
and
21 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Run Checks | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
jobs: | ||
delete-comments: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: izhangzhihao/delete-comment@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
delete_user_name: SuperViz-Dev | ||
issue_number: ${{ github.event.number }} | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9.10.0 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
- name: Install dependencies | ||
run: pnpm install --no-frozen-lockfile | ||
env: | ||
NPM_CONFIG_USERCONFIG: .npmrc.ci | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Create a .version.js file | ||
run: | | ||
touch .version.js && echo "echo \"export const version = 'test'\" > .version.js" | bash - | ||
- name: Create a .remote-config.js file | ||
run: | | ||
touch .remote-config.js && echo "echo \"module.exports = { remoteConfig: { apiUrl: 'https://dev.nodeapi.superviz.com' }};\" > .remote-config.js" | bash - | ||
- name: Run tests | ||
run: pnpm run build | ||
test-unit-realtime: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9.10.0 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
- name: Install dependencies | ||
run: pnpm install --no-frozen-lockfile | ||
env: | ||
NPM_CONFIG_USERCONFIG: .npmrc.ci | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Create a .version.js file | ||
run: | | ||
touch .version.js && echo "echo \"export const version = 'test'\" > .version.js" | bash - | ||
- name: Create a .remote-config.js file | ||
run: | | ||
touch .remote-config.js && echo "echo \"module.exports = { remoteConfig: { apiUrl: 'https://dev.nodeapi.superviz.com' }};\" > .remote-config.js" | bash - | ||
- name: Run tests | ||
run: pnpm run test:unit:ci --filter=@superviz/realtime | ||
- name: Post PR Comment | ||
run: npx github-actions-ctrf packages/realtime/ctrf/ctrf-report.json --pr-comment | ||
if: always() | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,6 +131,7 @@ dist | |
|
||
dist/ | ||
coverage/ | ||
ctrf/ | ||
.DS_Store | ||
.version.js | ||
.remote-config.js |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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