forked from jd-solanki/anu
-
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.
chore(anu-monorepo): add
edge
release channel script (jd-solanki#114)
- Loading branch information
1 parent
d29d613
commit 65d555d
Showing
12 changed files
with
958 additions
and
350 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 |
---|---|---|
@@ -1,58 +1,138 @@ | ||
name: Check build on various systems and node versions | ||
name: CI | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- "docs/**" | ||
branches: main | ||
pull_request: | ||
paths-ignore: | ||
- "docs/**" | ||
branches: main | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
node-version: [16.x, 18.x] | ||
os: [ubuntu-latest, windows-latest] | ||
node: [16] | ||
|
||
timeout-minutes: 10 | ||
|
||
name: Node ${{ matrix.node-version }} on ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
- uses: actions/checkout@v3 | ||
- run: corepack enable | ||
- uses: actions/setup-node@v3 | ||
with: | ||
version: 7 | ||
run_install: false | ||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- name: Setup pnpm cache | ||
node-version: ${{ matrix.node }} | ||
cache: "pnpm" | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build ANU | ||
run: pnpm build | ||
|
||
- name: Cache dist | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
path: packages/*/dist | ||
key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }} | ||
|
||
test: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [16] | ||
|
||
timeout-minutes: 10 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: corepack enable | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: "pnpm" | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Build anu | ||
run: pnpm run build | ||
|
||
- name: Run unit tests | ||
run: npm run test -- --reporter=junit --outputFile=../../test-results.xml | ||
run: pnpm run --filter=anu-vue test --reporter=junit --outputFile=../../test-results.xml | ||
|
||
- name: Add tests results to artifacts | ||
uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: test-results-${{ runner.os }}-${{ matrix.node-version }} | ||
name: test-results-${{ runner.os }}-${{ matrix.node }} | ||
path: test-results.xml | ||
|
||
lint: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [16] | ||
|
||
timeout-minutes: 10 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: corepack enable | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: "pnpm" | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Lint | ||
run: pnpm lint | ||
|
||
build-release: | ||
if: | | ||
github.event_name == 'push' && | ||
!contains(github.event.head_commit.message, '[skip-release]') && | ||
!contains(github.event.head_commit.message, 'chore') && | ||
!contains(github.event.head_commit.message, 'docs') | ||
needs: | ||
- build | ||
- test | ||
- lint | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [16] | ||
|
||
timeout-minutes: 20 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: corepack enable | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: "pnpm" | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Restore dist cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: packages/*/dist | ||
key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }} | ||
|
||
- name: Release Edge | ||
run: ./scripts/release-edge.sh | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_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
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
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
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
Oops, something went wrong.