From a094805d9e7ca36579363a996bbe74f3279298d5 Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Tue, 25 Jul 2023 22:22:48 -0400 Subject: [PATCH] Build: replace travis with GH actions workflow for npm test --- .github/workflows/node.js.yml | 31 +++++++++++++++++++++++++++++++ .travis.yml | 7 ------- 2 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/node.js.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 00000000..5309c6fa --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,31 @@ +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + # Old infra requires Node 10 + node-version: [10.x, 18.x] + + steps: + - name: Install xmllint + run: sudo apt-get install -y libxml2-utils + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c4177e89..00000000 --- a/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: - - "10" -addons: - apt: - packages: - - libxml2-utils