From 133f44c801f676860e8983d21038a5452b7bfb3f Mon Sep 17 00:00:00 2001 From: Jordi Marimon Date: Mon, 11 Mar 2024 19:40:04 +0100 Subject: [PATCH] build: merge github workflows into one --- .github/workflows/build.yml | 39 ++++++++++++++++++++--------------- .github/workflows/codecov.yml | 36 -------------------------------- CONTRIBUTING.md | 2 +- 3 files changed, 23 insertions(+), 54 deletions(-) delete mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 17b4454a..eafb4a75 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,9 +2,9 @@ name: Build and Test on: push: - branches: ['main'] + branches: [ 'main' ] pull_request: - branches: ['main'] + branches: [ 'main' ] jobs: analyse: @@ -17,24 +17,29 @@ jobs: security-events: write strategy: matrix: - node-version: [20.x] + node-version: [ 20.x ] steps: - - name: Checkout repository - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v3 - - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} - - name: Install latest NPM - run: npm i -g npm@latest + - name: Install latest NPM + run: npm i -g npm@latest - - name: Install dependencies - run: npm ci + - name: Install dependencies + run: npm ci - - name: Build - run: npm run build + - name: Build + run: npm run build - - name: Run tests - run: npm run test + - name: Run tests and collect coverage + run: npm run coverage + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + files: ./coverage/cobertura-coverage.xml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml deleted file mode 100644 index 2a119e75..00000000 --- a/.github/workflows/codecov.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Codecov - -on: - push: - branches: ['main'] - pull_request: - branches: ['main'] - -jobs: - analyse: - if: ${{ github.actor != 'dependabot[bot]' }} - name: Analyse - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Setup Node.js 20.x - uses: actions/setup-node@v3 - with: - node-version: 20.x - - - name: Install dependencies - run: npm ci - - - name: Run tests and collect coverage - run: npm run coverage - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - files: ./coverage/cobertura-coverage.xml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c69f4368..ec5135b3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,7 +11,7 @@ Recommended resources to look at: ## Filing Issues -Please search though open and closed issues to see if a similar issue already exists. If not, open an +Please search through open and closed issues to see if a similar issue already exists. If not, open an issue and try to provide a minimal reproduction if you can. ## Pull Requests