diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..ffb6622 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,42 @@ +name: Lint and Test + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [8, 12, 14] + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Setup Chrome + uses: browser-actions/setup-chrome@latest + with: + chrome-version: stable + + - name: Configure Chrome Sandbox + run: | + sudo chown root:root /opt/hostedtoolcache/setup-chrome/chromium/stable/x64/chrome-sandbox + sudo chmod 4755 /opt/hostedtoolcache/setup-chrome/chromium/stable/x64/chrome-sandbox + + - name: Install dependencies + run: npm install + + - name: Run ESLint and tests + run: npm test + env: + CHROME_BIN: chrome + CHROME_FLAGS: --no-sandbox --headless --disable-gpu \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 16952f2..0000000 --- a/.travis.yml +++ /dev/null @@ -1,33 +0,0 @@ -language: node_js - -node_js: -- 8 -- 12 -- 14 - -sudo: false - -before_script: - - npm install - -script: - - npm test - -deploy: - provider: npm - email: engineering-managers@wikimedia.de - api_key: - secure: JpC5C/PU8CwYpLMYEYqZ/s2dc50KOtm0RR8QC8dFFCxtNl2sfS0r+YNDA5+EvY4rfMJskmlo66J3Zt5sFtIb5LhDKAe6g1jAlGWKAnLhdqgdS2Mx2jz/g2z6swg4+FiLtzqjSSZwjLQz+8wcovEBdx5/Ox6FSJ2k8c6+8JgZZmo= - on: - tags: true - branch: master - condition: "$TRAVIS_NODE_VERSION = 12" - -notifications: - irc: - channels: - - "irc.libera.chat#wikidata-feed" - on_success: never - on_failure: always - template: - - "%{repository}/%{branch}/%{commit} : %{author} %{message} %{build_url}"