From 7c42f4b0a161d92eac93f79fe70ed670b24efa5d Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Thu, 21 Oct 2021 11:16:37 +0200 Subject: [PATCH] Replace Travis with Github Actions --- .github/workflows/ci.yml | 50 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 33 -------------------------- 2 files changed, 50 insertions(+), 33 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..ef6884684 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +name: Tests +'on': + push: + pull_request: + +jobs: + test: + runs-on: ubuntu-18.04 + name: Node ${{ matrix.node }} + strategy: + matrix: + node: + - '12' + - '14' + - '16' + steps: + - uses: actions/checkout@v2 + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + - run: sudo add-apt-repository -y ppa:inkscape.dev/stable && sudo apt-get update && sudo apt-get install -y inkscape graphicsmagick && inkscape --version + - run: npm install + - run: npm test + + test-targets: + runs-on: ubuntu-18.04 + name: ${{ matrix.targets.name }} + strategy: + matrix: + targets: + - name: 'Lint' + target: 'lint' + - name: 'Coverage' + target: 'coverage' + + steps: + - uses: actions/checkout@v2 + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: '14' + - run: sudo add-apt-repository -y ppa:inkscape.dev/stable && sudo apt-get update && sudo apt-get install -y inkscape graphicsmagick && inkscape --version + - run: npm install + - run: npm run ${{ matrix.targets.target }} + - name: Upload coverage + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + if: ${{ matrix.targets.target == 'coverage' }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fe3d43e05..000000000 --- a/.travis.yml +++ /dev/null @@ -1,33 +0,0 @@ -dist: bionic -language: node_js -node_js: - - 10 - - 12 - - 14 -cache: - npm: false - -matrix: - include: - - name: Lint - node_js: 14 - script: npm run lint - -before_install: 'sudo add-apt-repository -y ppa:inkscape.dev/stable && sudo apt-get update && sudo apt-get install -y inkscape && inkscape --version' -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - graphicsmagick - -script: npm run test:ci -after_success: '