diff --git a/.github/dependabot.yml b/.github/dependabot.yml index fe250eb..83df89e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,11 +1,26 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - version: 2 + updates: - - package-ecosystem: "npm" # See documentation for possible values - directory: "/" # Location of package manifests + - package-ecosystem: "npm" + directory: / + target-branch: develop + schedule: + interval: "monthly" + groups: + all-deps: + update-types: + - "major" + - "minor" + - "patch" + + - package-ecosystem: "npm" + directory: / + target-branch: version/2.x.x schedule: interval: "monthly" + groups: + all-deps: + update-types: + - "major" + - "minor" + - "patch" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a9cfca8..99bd00d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -7,10 +7,14 @@ name: "CodeQL" on: push: - branches: [master] + branches: + - 'develop' + - 'version/2.x.x' pull_request: # The branches below must be a subset of the branches above - branches: [master] + branches: + - 'develop' + - 'version/2.x.x' schedule: - cron: '0 3 * * 3' @@ -30,7 +34,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml deleted file mode 100644 index 5133d5b..0000000 --- a/.github/workflows/test-pr.yml +++ /dev/null @@ -1,31 +0,0 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Pull Request Checks - -on: - pull_request: - branches: [master] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: 16.x - - name: Use npm 9 - run: npm i -g npm@9 - - name: Install Dependencies - run: npm ci - - name: Check Prettier Formatting - run: npm run test:format - - name: Run ESLint - run: npm run lint - - name: Run Unit Tests - run: npm run test:unit - - name: Build - run: npm run build --if-present diff --git a/.github/workflows/test-push-to-master.yml b/.github/workflows/test-push-to-master.yml deleted file mode 100644 index b7a080d..0000000 --- a/.github/workflows/test-push-to-master.yml +++ /dev/null @@ -1,38 +0,0 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Test - -on: - push: - branches: [master] - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@master - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@master - with: - node-version: 16.x - - name: Use npm 9 - run: npm i -g npm@9 - - name: Install Dependencies - run: npm ci - - name: Check Prettier Formatting - run: npm run test:format - - name: Run ESLint - run: npm run lint - - name: Build - run: npm run build - - name: Run Tests - run: npm run test - env: - CI: true - LRS_CREDENTIALS_ARRAY: ${{ secrets.LRS_CREDENTIALS_ARRAY }} - - name: Coveralls - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..cae3510 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,46 @@ +name: Test + +on: + push: + branches: + - 'develop' + - 'version/2.x.x' + pull_request: + branches: + - 'develop' + - 'version/2.x.x' + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js 18 + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Install Dependencies + run: npm ci + + - name: Prettier + run: npm run test:format + + - name: ESLint + run: npm run lint + + - name: Build + run: npm run build --if-present + + - name: Test + run: npm run test + env: + CI: true + LRS_CREDENTIALS_ARRAY: ${{ secrets.LRS_CREDENTIALS_ARRAY }} + + - name: Coverage + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md index e008dca..ffdb5e5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ -[![npm version](https://img.shields.io/npm/v/@xapi/xapi.svg)](https://www.npmjs.com/package/@xapi/xapi) [![Test](https://github.com/xapijs/xapi/workflows/Test/badge.svg)](https://github.com/xapijs/xapi/actions/workflows/test-push-to-master.yml) [![Coverage Status](https://coveralls.io/repos/github/xapijs/xapi/badge.svg?branch=master)](https://coveralls.io/github/xapijs/xapi?branch=master) [![Maintainability](https://api.codeclimate.com/v1/badges/93dd4331b1fe39ab73d7/maintainability)](https://codeclimate.com/github/xapijs/xapi/maintainability) ![minified size](https://img.shields.io/bundlephobia/min/@xapi/xapi) ![minzipped size](https://img.shields.io/bundlephobia/minzip/@xapi/xapi) +[![npm version](https://img.shields.io/npm/v/@xapi/xapi.svg)](https://www.npmjs.com/package/@xapi/xapi) +[![test](https://github.com/xapijs/xapi/actions/workflows/test.yml/badge.svg?branch=develop)](https://github.com/xapijs/xapi/actions/workflows/test.yml) +[![Coverage Status](https://coveralls.io/repos/github/xapijs/xapi/badge.svg?branch=develop)](https://coveralls.io/github/xapijs/xapi?branch=develop) +[![maintainability](https://api.codeclimate.com/v1/badges/93dd4331b1fe39ab73d7/maintainability)](https://codeclimate.com/github/xapijs/xapi/maintainability) +![minified size](https://img.shields.io/bundlephobia/min/@xapi/xapi) +![minzipped size](https://img.shields.io/bundlephobia/minzip/@xapi/xapi) [xAPI.js logo](https://www.xapijs.dev)