From b25435052b0d9d2eb7bc732bf5ca84b437263847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Fri, 20 May 2022 12:09:16 +0200 Subject: [PATCH] fix: coverage build for main should be a seperate workflow --- .github/workflows/build.yaml | 7 +--- .github/workflows/build_coverage.yaml | 50 +++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/build_coverage.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b5e8d8cbe1..81403b3d96 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -39,13 +39,8 @@ jobs: node-version: ${{ matrix.node-version }} - run: yarn - run: yarn lint - - run: yarn run test:coverage - - run: scripts/commit-coverage.sh + - run: yarn run test env: CI: true TEST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres - - name: Coveralls - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build_coverage.yaml b/.github/workflows/build_coverage.yaml new file mode 100644 index 0000000000..cc6d633a77 --- /dev/null +++ b/.github/workflows/build_coverage.yaml @@ -0,0 +1,50 @@ +name: Coverage + +on: + push: + branches: + - main + paths-ignore: + - website/** + - coverage/** + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + services: + # Label used to access the service container + postgres: + # Docker Hub image + image: postgres + # Provide the password for postgres + env: + POSTGRES_PASSWORD: postgres + # Set health checks to wait until postgres has started + ports: + - 5432:5432 + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - run: yarn + - run: yarn run test:coverage + - run: scripts/commit-coverage.sh + env: + CI: true + TEST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres + DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }}