-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from binh-dam-ibigroup/fix-master-actions
Fix master actions
- Loading branch information
Showing
4 changed files
with
73 additions
and
30 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,16 @@ | ||
# GitHub Action to automate the identification of common misspellings in text files. | ||
# https://github.com/codespell-project/actions-codespell | ||
# https://github.com/codespell-project/codespell | ||
name: codespell | ||
on: pull_request | ||
jobs: | ||
codespell: | ||
name: Check for spelling errors | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: codespell-project/actions-codespell@master | ||
with: | ||
check_filenames: true | ||
only_warn: 1 | ||
skip: ./.git,yarn.lock,./stories/data/* |
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,56 @@ | ||
name: Node.js CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
test-build-release: | ||
env: | ||
GIT_BRANCH_NAME: ${{ github.ref }} | ||
IS_PUSH: ${{ github.event.push }} | ||
IS_PUSH_TO_MASTER: ${{ github.event.push && github.ref == 'refs/heads/master' }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js 12.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
- name: Install npm packages using cache | ||
uses: bahmutov/npm-install@v1 | ||
- name: Lint code | ||
run: yarn lint | ||
- name: Run tests with coverage | ||
run: yarn cover | ||
|
||
# at this point, the build is successful | ||
- name: Codecov | ||
uses: codecov/[email protected] | ||
continue-on-error: true | ||
- name: Semantic Release | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: yarn semantic-release | ||
|
||
# Steps below deal with uploading Storybook to S3, | ||
# which is only performed with a push to the main branch. | ||
# Note that AWS CLI v2 is already installed by default on GitHub's Ubuntu 20.04. | ||
# per https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md#cli-tools. | ||
- name: Add AWS credentials | ||
if: ${{ env.IS_PUSH_TO_MASTER }} | ||
run: mkdir ~/.aws && printf '%s\n' '[default]' "aws_access_key_id=$AWS_ACCESS_KEY_ID" "aws_secret_access_key=$AWS_SECRET_ACCESS_KEY" "region=$AWS_REGION" > ~/.aws/config | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
# Deploy storybook demo to S3 if handling a push (non-PR build) on the main branch | ||
# https://s3.amazonaws.com/transitive.js/index.html | ||
- name: Deploy storybook to S3 | ||
if: ${{ env.IS_PUSH_TO_MASTER }} | ||
run: yarn deploy-storybook |
This file was deleted.
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