diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..29239aff1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,67 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Use Node.js latest + uses: actions/setup-node@v3 + with: + node-version: "*" + cache: "yarn" + - name: Bootstrap + run: yarn && yarn bootstrap + - name: Build + run: yarn build + - uses: actions/upload-artifact@v3 + with: + name: lib + path: | + packages/*/lib/**/* + utils/*/lib/** + + lint: + name: Lint + needs: build + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Use Node.js latest + uses: actions/setup-node@v3 + with: + node-version: "*" + cache: "yarn" + - name: Install + run: yarn + - name: Lint + run: yarn lint + + test: + name: Test on Node.js # GitHub will add ${{ matrix.node-version }} to this title + needs: build + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + node-version: [16, 14, 12, 10, 8, 6] + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} # Checkout node version for test executor + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: "yarn" + - name: Install + run: yarn && yarn bootstrap + - uses: actions/download-artifact@v3 + with: + name: lib + - name: Test + run: yarn test diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 304c2d290..000000000 --- a/appveyor.yml +++ /dev/null @@ -1,32 +0,0 @@ -init: - - git config --global core.autocrlf input - -environment: - matrix: - - nodejs_version: '10' - - nodejs_version: '8' - - nodejs_version: '6' - -cache: - - "%LOCALAPPDATA%\\Yarn" - -install: - - ps: Install-Product node $env:nodejs_version x64 - - npm install -g yarn@1.7.0 - - set PATH=%APPDATA%\npm;%PATH% - - yarn - -matrix: - fast_finish: true - -build: 'off' - -shallow_clone: true - -before_test: - - cmd: yarn build - -test_script: - - node --version - - yarn --version - - yarn test --no-cache