diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..637077ae --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,56 @@ +# yamllint disable rule:line-length +# yamllint disable rule:braces +name: CI + +on: + pull_request: + push: + branches: + - main + - master + +jobs: + tests: + name: Testing with Node.js ${{ matrix.node-version }} + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: + - '6.x' + - '8.x' + - '10.x' + - '12.x' + - '14.x' + - '15.x' + - '16.x' + - '17.x' + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ~/.npm + key: npm-${{ matrix.node-version }}-${{ hashFiles('package*.json') }} + restore-keys: | + npm-${{ matrix.node-version }}- + + - name: Install dependencies + run: | + npm install --ignore-scripts + + - name: Build + run: | + npm run build --if-present + + - name: Run tests + run: | + npm test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 05e32aba..00000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -notifications: - email: - - keith@tumblr.com -language: node_js -node_js: - - "6" - - "8" - - "10"