Skip to content

Adds getPaymentMethods, saveInvoice, getTags, getSevUsers, getContactAddresses, getStaticCountries, getParts #22

Adds getPaymentMethods, saveInvoice, getTags, getSevUsers, getContactAddresses, getStaticCountries, getParts

Adds getPaymentMethods, saveInvoice, getTags, getSevUsers, getContactAddresses, getStaticCountries, getParts #22

name: πŸ§ͺ Test and πŸš€ Release
on:
push:
branches:
- main
- beta
pull_request: {}
jobs:
test-and-release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
node-version: [16.x]
steps:
- name: πŸ›‘ Cancel Previous Runs
uses: styfle/cancel-workflow-action@a40b8845c0683271d9f53dfcb887a7e181d3918b # pin@0.9.1
- name: ⬇️ Checkout repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # pin@v2
- name: βŽ” Setup node ${{ matrix.node-version }}
uses: actions/setup-node@25316bbc1f10ac9d8798711f44914b1cf3c4e954 # pin@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: πŸ—„ Cache node_modules
id: cache-node_modules
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # pin@v2
with:
path: "**/node_modules"
key: node_modules-${{ runner.os }}-node-${{ matrix.node-version }}-${{
hashFiles('**/package-lock.json') }}
- name: πŸ—„ Cache .eslintcache
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # pin@v2
with:
path: .eslintcache
key: eslintcache-${{ runner.os }}-node-${{ matrix.node-version }}-${{
hashFiles('**/package-lock.json') }}
- name: πŸ“₯ Install dependencies
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: |
npm ci --ignore-scripts
- name: πŸ§ͺ Test
run: |
touch .env
npm run test:ci
env:
CI: true
TEST_SEVDESK_API_TOKEN: ${{ secrets.TEST_SEVDESK_API_TOKEN }}
- name: ⬆️ Upload coverage report
uses: coverallsapp/github-action@9ba913c152ae4be1327bfb9085dc806cedb44057 # pin@1.1.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# - RELEASE ---------------------------------------------------------------------------------------
- name: πŸš€ Release on GitHub and npm
if: "contains(' refs/heads/main refs/heads/beta ', github.ref) &&
matrix.node-version == '16.x'"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_NPM_CONFIG_REGISTRY: https://npm.pkg.github.com/
GITHUB_NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLIC_NPM_CONFIG_REGISTRY: https://registry.npmjs.org
PUBLIC_NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm run release