From fca73d9f9c980d2dbc45232cdeaa9cce8f4b800b Mon Sep 17 00:00:00 2001 From: surilindur Date: Mon, 25 Mar 2024 13:17:24 +0200 Subject: [PATCH] Assume the tests have passed when release is created --- .github/workflows/ci.yml | 56 ++++++++++++++++++++++++++++++- .github/workflows/publish.yml | 4 --- .github/workflows/test.yml | 62 ----------------------------------- 3 files changed, 55 insertions(+), 67 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 734dcb8..5533846 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,5 +12,59 @@ concurrency: jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: latest + - uses: actions/cache@v4 + with: + path: '**/.yarn' + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + - run: corepack enable + - run: yarn install --immutable + - run: yarn run lint + test: - uses: ./.github/workflows/test.yml + needs: lint + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: + - ubuntu-latest + node-version: + - 18.x + - 20.x + - latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - run: git config --global core.autocrlf input + - uses: actions/cache@v4 + with: + path: '**/.yarn' + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + - run: corepack enable + - run: yarn install --immutable + - run: yarn run build + - run: yarn run test + - uses: coverallsapp/github-action@v2 + with: + github-token: ${{ secrets.github_token }} + flag-name: run-${{ matrix.node-version }} + parallel: true + + coveralls: + needs: + - test + runs-on: ubuntu-latest + steps: + - name: Consolidate test coverage from different jobs + uses: coverallsapp/github-action@v2 + with: + github-token: ${{ secrets.github_token }} + parallel-finished: true diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 739ae0d..d259cf6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,11 +16,7 @@ permissions: jobs: - test: - uses: ./.github/workflows/test.yml - publish: - needs: test runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 4fee95b..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Test - -on: workflow_call - -jobs: - - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: latest - - uses: actions/cache@v4 - with: - path: '**/.yarn' - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - - run: corepack enable - - run: yarn install --immutable - - run: yarn run lint - - test: - needs: lint - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: - - ubuntu-latest - node-version: - - 18.x - - 20.x - - latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - run: git config --global core.autocrlf input - - uses: actions/cache@v4 - with: - path: '**/.yarn' - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - - run: corepack enable - - run: yarn install --immutable - - run: yarn run build - - run: yarn run test - - uses: coverallsapp/github-action@v2 - with: - github-token: ${{ secrets.github_token }} - flag-name: run-${{ matrix.node-version }} - parallel: true - - coveralls: - needs: - - test - runs-on: ubuntu-latest - steps: - - name: Consolidate test coverage from different jobs - uses: coverallsapp/github-action@v2 - with: - github-token: ${{ secrets.github_token }} - parallel-finished: true