-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix logs for new SplitFactoryProvider component
- Loading branch information
1 parent
326aa6d
commit c59fe5e
Showing
8 changed files
with
236 additions
and
92 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,163 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
pull_request: | ||
branches: | ||
- master | ||
- development | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up nodejs | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 'lts/*' | ||
cache: 'npm' | ||
|
||
- name: npm ci | ||
run: npm ci | ||
|
||
- name: npm check | ||
run: npm run check | ||
|
||
- name: npm test | ||
run: npm run test -- --coverage | ||
|
||
- name: npm build | ||
run: BUILD_BRANCH=$(echo "${GITHUB_REF#refs/heads/}") npm run build | ||
|
||
- name: Set VERSION env | ||
run: echo "VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV | ||
|
||
- name: SonarQube Scan (Push) | ||
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/development') | ||
uses: SonarSource/[email protected] | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
projectBaseDir: . | ||
args: > | ||
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} | ||
-Dsonar.projectVersion=${{ env.VERSION }} | ||
-Dsonar.branch.name=${{ github.ref_name }} | ||
- name: SonarQube Scan (Pull Request) | ||
if: github.event_name == 'pull_request' | ||
uses: SonarSource/[email protected] | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
projectBaseDir: . | ||
args: > | ||
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} | ||
-Dsonar.projectVersion=${{ env.VERSION }} | ||
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }} | ||
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} | ||
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }} | ||
- name: Store assets | ||
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/development') | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: assets | ||
path: umd/ | ||
retention-days: 1 | ||
|
||
upload-stage: | ||
name: Upload assets | ||
runs-on: ubuntu-latest | ||
needs: build | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/development' | ||
strategy: | ||
matrix: | ||
environment: | ||
- stage | ||
include: | ||
- environment: stage | ||
account_id: "079419646996" | ||
bucket: split-public-stage | ||
|
||
steps: | ||
- name: Download assets | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: assets | ||
path: umd | ||
|
||
- name: Display structure of assets | ||
run: ls -R | ||
working-directory: umd | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1-node16 | ||
with: | ||
role-to-assume: arn:aws:iam::${{ matrix.account_id }}:role/gha-public-assets-role | ||
aws-region: us-east-1 | ||
|
||
- name: Upload to S3 | ||
run: aws s3 sync $SOURCE_DIR s3://$BUCKET/$DEST_DIR $ARGS | ||
env: | ||
BUCKET: ${{ matrix.bucket }} | ||
SOURCE_DIR: ./umd | ||
DEST_DIR: sdk | ||
ARGS: --acl public-read --follow-symlinks --cache-control max-age=31536000,public | ||
|
||
upload-prod: | ||
name: Upload assets | ||
runs-on: ubuntu-latest | ||
needs: build | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
strategy: | ||
matrix: | ||
environment: | ||
- prod | ||
include: | ||
- environment: prod | ||
account_id: "825951051969" | ||
bucket: split-public | ||
|
||
steps: | ||
- name: Download assets | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: assets | ||
path: umd | ||
|
||
- name: Display structure of assets | ||
run: ls -R | ||
working-directory: umd | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1-node16 | ||
with: | ||
role-to-assume: arn:aws:iam::${{ matrix.account_id }}:role/gha-public-assets-role | ||
aws-region: us-east-1 | ||
|
||
- name: Upload to S3 | ||
run: aws s3 sync $SOURCE_DIR s3://$BUCKET/$DEST_DIR $ARGS | ||
env: | ||
BUCKET: ${{ matrix.bucket }} | ||
SOURCE_DIR: ./umd | ||
DEST_DIR: sdk | ||
ARGS: --acl public-read --follow-symlinks --cache-control max-age=31536000,public |
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 +1 @@ | ||
v16.16.0 | ||
lts/* |
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.