diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml new file mode 100644 index 0000000..f31b32b --- /dev/null +++ b/.github/workflows/checks.yaml @@ -0,0 +1,33 @@ +name: Regression checks +on: + push: + branches: + - '**' + schedule: # Weekly runs to pick up on bitrot + - cron: '37 23 * * 0' + +defaults: + run: + shell: bash + +jobs: + checks: + name: Checks + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [9.11.2, lts/*, latest] + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup nodejs ${{matrix.node-version}} + uses: actions/setup-node@v3 + with: + node-version: ${{matrix.node-version}} + cache: 'npm' + - name: Install packages + run: npm ci || npm install # 9.11.2 doesn't grok "ci" + - name: Syntax check + run: npm run check + - name: Regression tests + run: npm run test diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..684c800 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,35 @@ +name: Release +on: + push: + tags: + - '[1-9]+.[0-9]+.[0-9]+' + +defaults: + run: + shell: bash + +jobs: + release: + name: Package and release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup nodejs + uses: actions/setup-node@v3 + with: + node-version: current + cache: 'npm' + - name: Install packages + run: npm ci + - name: Update version + run: npm version --no-git-tag-version --force "$GITHUB_REF_NAME" + - name: Package + run: npm pack + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: chariotd-${{github.ref_name}}.tgz + draft: true + generate_release_notes: true + fail_on_unmatched_files: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 67a145f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -# yamllint disable-line rule:document-start -language: node_js -node_js: - - lts/* -install: - - npm install -script: - - npm run check - - npm run test -before_deploy: - - npm version --no-git-tag-version --force "$TRAVIS_TAG" - - npm pack -deploy: - provider: releases - edge: true # use dpl v2 - token: - # yamllint disable-line rule:line-length - secure: CJUj+vP5ENQvTkcCMd68sIk1jOWWq260EvSGhpSHZZ2aLCeyMLi0/+s0OnDnVtB01vePEk9riCCx6Zt0CsT6Xw/xUDiFzz2lqIB9DOI/skwn+nCjKWk2AyQrkPd2h+6GKb5EVwOD9l3uicb7x/v1nUWaGh/yDNulQUju8yNUPkIvKvAvaLkK2wE6SlR+wL2Zqe2uVdCOJoJXRUkmyxj54b5QidjGn6hAjraxE9dsN1jStYhFUqDqNAyPIwbyqqZxdlezKZvhK6DW9CgYZEJ6CnpIDwO047dNiim552cPW4J01W3XPJYbggDiljJ9gYUr89oBLoFfvN3Jugo5/BWoHKShY4O2PPVIpItcoUdjIxR1oEdNH46Z/yhjXgttI0wvh4G7SbHq1oJogsWiPgGPupDehrMSugX8HZIra3Ejv4Vcrbw5amRWTLXQd+Fuq5jFHpX89goSy+s4yXFhvMUX8JyM+AmdW6b4taDfmXREg7nnWMaN9o6wIRYo12rH6N/1ysKUgGX0a9Z1GLExFxvPHEzFb3iY6x3OzRhQF+hrQM6IAMtk032AiXSNzMfBpOOQcm7B6WvRQukt3f5/Gxm8wGchJYEbFIIZ6vdhZgd/6zEgKK6L5yjoe+C6/FAen1ClTdwix313cFiVrU767IaG75QSA85VUx0a3KmPz+ZZMQ8= - file: chariotd-*.tgz - # yamllint disable-line rule:truthy - on: - all_branches: true - tags: true - repo: DiUS/chariotd