From 8e620750dc74b44d1953500644f7b802c1ac3fd8 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 1 Feb 2021 00:03:55 +0100 Subject: [PATCH] CI tweaks --- .github/dependabot.yml | 11 ++++----- .github/workflows/ci.yml | 50 +++++++++++++++++++++++++--------------- .prettierrc | 3 ++- 3 files changed, 39 insertions(+), 25 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e6792cc..7423bc2 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,8 +1,7 @@ version: 2 updates: -- package-ecosystem: npm - directory: "/" - schedule: - interval: daily - time: '04:00' - open-pull-requests-limit: 10 + - package-ecosystem: npm + directory: '/' + schedule: + interval: weekly + time: '04:00' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index baf1764..b0c91b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,29 +1,44 @@ name: 'CI/CD Pipeline' -on: [push] +on: + push: + branches: + - main + pull_request: + branches: + - '**' jobs: test: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + node: ['14'] steps: - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node }} - - uses: actions/setup-node@v1 - with: - node-version: '13.x' - - uses: actions/cache@v1 - with: - path: ~/.npm - key: ${{ runner.os }}-node + - run: npm ci + - run: npm test + - run: npm run build - - run: npm install - - name: Run tests & publish code coverage - uses: paambaati/codeclimate-action@v2.4.0 - with: - coverageCommand: npm test + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + - run: npm ci + - uses: paambaati/codeclimate-action@v2.7.5 env: CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + with: + coverageCommand: npm test publish: needs: test @@ -31,17 +46,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2 with: - node-version: '13.x' registry-url: 'https://registry.npmjs.org' - - run: npm install + + - run: npm ci - run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # - uses: actions/setup-node@v1 # with: - # node-version: '13.x' # registry-url: 'https://npm.pkg.github.com' # - run: npm publish # env: diff --git a/.prettierrc b/.prettierrc index 338a8b9..6ddb8fd 100644 --- a/.prettierrc +++ b/.prettierrc @@ -2,5 +2,6 @@ "semi": false, "singleQuote": true, "trailingComma": "none", - "tabWidth": 2 + "tabWidth": 2, + "endOfLine": "auto" }