diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 694b88e6..00000000 --- a/.appveyor.yml +++ /dev/null @@ -1,31 +0,0 @@ -version: "{build}" - -clone_depth: 5 - -environment: - RUBY_FOLDER_VERSION: "25-x64" - PLATFORM: "x64" - -install: - - SET "PATH=C:\Ruby%RUBY_FOLDER_VERSION%\bin;%PATH%" - - bundle install --deployment --retry=3 --clean --jobs=%NUMBER_OF_PROCESSORS% - - ps: Install-Product node "10" $env:PLATFORM - - npm ci - -build: off - -test_script: - - ruby -v - - gem -v - - bundle -v - - node -v - - npm -v - - java -version - - npm test - -matrix: - fast_finish: true - -cache: - - '%APPDATA%\npm-cache\ -> .appveyor.yml,package.json,package-lock.json' - - 'vendor\bundle -> .appveyor.yml,Gemfile,Gemfile.lock' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..45e881d6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,69 @@ +name: CI + +on: [push, pull_request] + +env: + CI: true + NODE: 12.x + RUBY: 2.6.x + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: ${{ env.NODE }} + + - name: Set up Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: ${{ env.RUBY }} + + - name: Disable gem docs + run: 'echo "gem: --no-document" > ~/.gemrc' + + - name: Set up Ruby cache + uses: actions/cache@v1 + with: + path: vendor/bundle + key: ${{ runner.os }}-ruby-v${{ env.RUBY }}-${{ hashFiles('Gemfile') }}-${{ hashFiles('Gemfile.lock') }}-${{ hashFiles('.github/workflows/ci.yml') }} + restore-keys: | + ${{ runner.os }}-ruby-v${{ env.RUBY }}-${{ hashFiles('Gemfile') }}-${{ hashFiles('Gemfile.lock') }}-${{ hashFiles('.github/workflows/ci.yml') }} + + - name: Set up npm cache + uses: actions/cache@v1 + with: + path: ~/.npm + key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}-${{ hashFiles('.github/workflows/ci.yml') }} + restore-keys: | + ${{ runner.OS }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}-${{ hashFiles('.github/workflows/ci.yml') }} + + - name: Set up Bundler + run: gem install bundler -v "~> 1.17" + + - run: ruby --version + - run: gem --version + - run: bundle --version + - run: node --version + - run: npm --version + - run: java -version + + - name: Install npm dependencies + run: npm ci + + - name: Install bundler dependencies + run: bundle install --deployment --jobs=4 --retry=3 --clean + + - name: Run tests + run: npm test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9ce4ed41..00000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -git: - depth: 5 - -language: node_js - -node_js: - - "10" - -env: - global: - - RUBY_VERSION=2.5 - -before_install: - - rvm use $RUBY_VERSION --install --binary --fuzzy - -install: - - npm ci - - bundle install --deployment --retry=3 --clean - -matrix: - fast_finish: true - -cache: - directories: - - "$HOME/.npm" - - vendor/bundle - -notifications: - email: false diff --git a/README.md b/README.md index f5d79331..cb36b5bc 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # The source code of -[![Linux Build Status](https://img.shields.io/travis/mpc-hc/mpc-hc.org/master.svg?label=Linux%20build)](https://travis-ci.org/mpc-hc/mpc-hc.org) -[![Windows Build Status](https://img.shields.io/appveyor/ci/XhmikosR/mpc-hc-org/master.svg?label=Windows%20build)](https://ci.appveyor.com/project/XhmikosR/mpc-hc-org/branch/master) +[![Build Status](https://github.com/mpc-hc/mpc-hc.org/workflows/CI/badge.svg)](https://github.com/mpc-hc/mpc-hc.org/actions?workflow=CI) [![devDependencies Status](https://img.shields.io/david/dev/mpc-hc/mpc-hc.org.svg)](https://david-dm.org/mpc-hc/mpc-hc.org?type=dev) ## Getting started