-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add build-and-deploy-stg to create staging env for integration & …
…load test
- Loading branch information
Showing
2 changed files
with
33 additions
and
11 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 |
---|---|---|
|
@@ -7,8 +7,10 @@ name: CI | |
jobs: | ||
lint: | ||
uses: ./.github/workflows/lint.yml | ||
build-and-deploy: | ||
build-and-deploy-stg: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- lint | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
|
@@ -20,13 +22,25 @@ jobs: | |
env: | ||
CI: true | ||
- uses: cloudflare/[email protected] | ||
name: Deploy to Cloudflare | ||
name: Deploy to Cloudflare (Staging) | ||
with: | ||
apiToken: "${{ secrets.CF_API_TOKEN }}" | ||
environment: "staging" | ||
k6-load-test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
needs: | ||
- build-and-deploy-stg | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: grafana/[email protected] | ||
name: Run k6 local test | ||
with: | ||
filename: scripts/test.js | ||
semantic-release: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build-and-deploy | ||
- k6-load-test | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
|
@@ -35,18 +49,26 @@ jobs: | |
cache: npm | ||
- run: npm ci | ||
- run: npx semantic-release | ||
name: Semantic Release | ||
name: Run Semantic Release | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}" | ||
load-test: | ||
build-and-deploy-prd: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
needs: | ||
- build-and-deploy | ||
- k6-load-test | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: grafana/[email protected] | ||
name: Run k6 test | ||
- uses: actions/setup-node@v3 | ||
with: | ||
filename: scripts/test.js | ||
node-version: lts/* | ||
cache: npm | ||
- run: npm ci | ||
- run: npm run build --if-present | ||
env: | ||
CI: true | ||
- uses: cloudflare/[email protected] | ||
name: Deploy to Cloudflare (Production) | ||
with: | ||
apiToken: "${{ secrets.CF_API_TOKEN }}" | ||
environment: "production" |
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