From 9b1982e3abfbd65ffef7767cc59966ae75b6a99e Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Fri, 16 Apr 2021 01:12:28 -0400 Subject: [PATCH 1/2] chore: remove travis config Signed-off-by: Rui Chen --- .travis.yml | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index dd818f85..00000000 --- a/.travis.yml +++ /dev/null @@ -1,37 +0,0 @@ -language: node_js -node_js: - - "10.16.3" -cache: - yarn: true - -# Conditional builds: -# Build for PRs and master merges -# Don't build if release has already been tagged (GH integrations) -if: (branch = master OR type = pull_request) AND tag IS blank - -# Install specific version of yarn -before_install: - - echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > $HOME/.npmrc - - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.13.0 - - export PATH=$HOME/.yarn/bin:$PATH - # install travis-ci `artifacts` tool - - curl -sL https://raw.githubusercontent.com/travis-ci/artifacts/master/install | bash - -before_script: - # Exit the build if there are any diffs in the yarn.lock file - - git diff --exit-code yarn.lock - # Verifies that versions of the package deps in package.json match those in yarnโ€™s lock file - # - yarn check - -script: - # Build the artifacts to publish; don't build docs - - yarn build:src - # Run unit tests - - yarn test:unit - # use lerna publish to version and deploy new packages - - make publish - -after_failure: - # use travis-ci/artifacts tool to upload any failed - # visual regression test diffs to s3 - - make upload-artifacts From 13def2a4873d1478e8b5a2351eed2838a514bb46 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Fri, 16 Apr 2021 01:12:41 -0400 Subject: [PATCH 2/2] chore: add github action Signed-off-by: Rui Chen --- .github/workflows/main.yml | 50 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..e75cb329 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,50 @@ +name: main + +on: push + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + env: + COVERALLS_REPO_TOKEN: '${{ secrets.COVERALLS_REPO_TOKEN }}' + COVERALLS_GIT_COMMIT: '${{ github.sha }}' + COVERALLS_GIT_BRANCH: '${{ github.ref }}' + + steps: + - name: Checkout ๐Ÿ›Ž๏ธ + uses: actions/checkout@v2 + + - name: Turnstyle + uses: softprops/turnstyle@v1 + timeout-minutes: 10 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup Yarn Cache ๐Ÿ’พ + id: yarn-cache + uses: actions/cache@v2 + with: + path: '**/node_modules' + key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-node-modules + + - name: Install Node.js ๐Ÿ”ง # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built. + uses: actions/setup-node@v2 + with: + node-version: '10' + + - run: yarn install + if: steps.yarn-cache.outputs.cache-hit != 'true' + + - name: Build and Test ๐Ÿ‘ท + run: | + yarn build:src + yarn test:unit + env: + CI: true + + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }}