From a526b4e5cd7649987b14d14032bf4d792936281b Mon Sep 17 00:00:00 2001 From: Zak Henry Date: Thu, 8 Sep 2022 07:00:02 +1200 Subject: [PATCH] fix(CI): move from shutdown travis ci to github actions --- .github/workflows/main.yml | 36 ++++++++++++++++++++++++++++++++++++ .travis.yml | 26 -------------------------- 2 files changed, 36 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..db558aa --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,36 @@ +# GitHub Actions docs +# https://help.github.com/en/articles/about-github-actions +# https://help.github.com/en/articles/workflow-syntax-for-github-actions +name: CI + +on: [push] + +jobs: + build: + # Machine environment: + # https://help.github.com/en/articles/software-in-virtual-environments-for-github-actions#ubuntu-1804-lts + # We specify the Node.js version manually below, and use versioned Chrome from Puppeteer. + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js 16.14.2 + uses: actions/setup-node@v1 + with: + node-version: 16.14.2 + - name: Install dependencies + run: yarn --frozen-lockfile --non-interactive --no-progress + - name: Format check + run: yarn prettier:check + - name: Build Lib + run: yarn build + - name: Test Lib + run: yarn test + - name: Check Readme + run: yarn readme:check + - name: Release + if: contains('refs/heads/master', github.ref) + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx semantic-release diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 25ae39d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -sudo: false - -language: node_js -node_js: - - '12' - -cache: yarn - -install: - - yarn --frozen-lockfile --non-interactive --no-progress - -script: - # lint - - yarn prettier:check - # build - - yarn build - # tests - - yarn test - - yarn readme:check - -deploy: - - provider: script - skip_cleanup: true - script: yarn semantic-release - on: - branch: master