ci: configure GitHub actions and remove Travis

This commit is contained in:
Zoltan Kochan
2020-11-23 00:03:20 +02:00
parent fba7155123
commit b2a7670f0f
3 changed files with 40 additions and 39 deletions

40
.github/workflows/node-linux.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: Node
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '10.16', '12' ]
name: ${{ matrix.node }} (Linux)
steps:
- name: Configure Git
run: |
git config --global core.autocrlf false
git config --global user.name "xyz"
git config --global user.email "x@y.z"
- name: Checkout Commit
uses: actions/checkout@v1
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: checkout master
run: git branch -f master origin/master
- name: install pnpm
run: |
npm install pnpm@next -g
pnpm --version
- name: pnpm install
run: pnpm recursive install
- name: run tests (master)
if: github.ref == 'refs/heads/master'
run: pnpm run test-master
- name: run tests (branch)
if: github.ref != 'refs/heads/master'
run: pnpm run test-branch

View File

@@ -1,38 +0,0 @@
language: node_js
node_js:
- 10.16
- 12.18.2
git:
depth: 5
sudo: false
before_install:
- npm set verify-store-integrity false
- git fetch --unshallow
- curl -L https://raw.githubusercontent.com/pnpm/self-installer/master/install.js | PNPM_VERSION=5.9.3 node
# Testing whether pnpm can upgrade itself
- npm install --global npm@latest
- pnpm i -g pnpm@next
- pnpm -v
install:
- pnpm install --force
script:
- set -e # Fail on first error
# TODO: fix commitlint
# - /bin/bash lint-commits.sh
# - ./tools/node_modules/.bin/commitlint --from=$TRAVIS_COMMIT
- if [ "$TRAVIS_BRANCH" = "master" ]; then pnpm run test-master; fi
- if [ "$TRAVIS_BRANCH" != "master" ]; then pnpm run test-branch; fi
- set +e
after_success:
- if [ "$TRAVIS_NODE_VERSION" = "12" ]; then pnpm run coveralls; fi;
cache:
directories:
- storage
env:
global:
- CC=clang CXX=clang++ npm_config_clang=1
- GIT_NAME: Travis CI
- GIT_EMAIL: nobody@nobody.org
- GITHUB_REPO: pnpm/pnpm
notifications:
email: false

View File

@@ -15,7 +15,6 @@ To quote the [Rush](https://rushjs.io/) team:
> Microsoft uses pnpm in Rush repos with hundreds of projects and hundreds of PRs per day, and weve found it to be very fast and reliable.
[![npm version](https://img.shields.io/npm/v/pnpm.svg)](https://www.npmjs.com/package/pnpm)
[![Status](https://travis-ci.com/pnpm/pnpm.svg?branch=master)](https://travis-ci.com/pnpm/pnpm "See test builds")
[![Coverage Status](https://coveralls.io/repos/github/pnpm/pnpm/badge.svg?branch=master)](https://coveralls.io/github/pnpm/pnpm?branch=master)
[![Join the chat at Discord](https://img.shields.io/discord/731599538665553971.svg)](https://discord.gg/mThkzAT)
[![OpenCollective](https://opencollective.com/pnpm/backers/badge.svg)](#backers)