From f8abd2e6648acbf9c3b7b2682daedd5d1ac9ff1b Mon Sep 17 00:00:00 2001 From: xobotyi Date: Sun, 24 Jul 2022 11:04:25 +0300 Subject: [PATCH] ci: add github action for ci Also remove travis config --- .github/workflows/ci.yaml | 42 +++++++++++++++++++++++++++++++++++++++ .travis.yml | 22 -------------------- 2 files changed, 42 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..12a8c2b --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,42 @@ +name: "CI" + +on: + push: + branches: + - master + pull_request: + branches: + - master + workflow_dispatch: + +env: + HUSKY: 0 + +jobs: + test: + name: "Test" + runs-on: ubuntu-latest + steps: + - name: "Checkout" + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v3 + with: + node-version: 16 + + - uses: bahmutov/npm-install@v1 + with: + useRollingCache: true + install-command: yarn --frozen-lockfile + + - name: "Test" + run: yarn test + + - name: "Upload coverage to Codecov" + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage/lcov.info + fail_ci_if_error: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 487dabb..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: node_js -node_js: - - "stable" - - "9" - - "10" - -sudo: true -addons: - chrome: stable - -matrix: - fast_finish: true - -cache: - directories: - - "node_modules" - -script: - - npm run test - -after_success: - - npm run push-codacy-coverage