diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index af78afa77..181898d44 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,13 +2,12 @@ name: build on: push: - pull_request: + branches: + - main jobs: build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v2 with: @@ -20,8 +19,6 @@ jobs: - name: Run npm steps run: | npm install - npm run eslint - npm run abaplint npm run merge npm run merge.ci - name: build-merged-build @@ -48,3 +45,30 @@ jobs: name: zabapgit_standalone.abap path: ./zabapgit.abap retention-days: 7 + coverage: + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '16' + - name: npm run unit + run: | + npm install + npm run unit + - name: npm run coverage + run: | + npm run coverage + - name: Update coverage.abapgit.org + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/main' && github.repository == 'abapGit/abapGit' + with: + deploy_key: ${{ secrets.COVERAGE_DEPLOY_KEY }} + external_repository: abapGit/coverage.abapgit.org + user_name: 'github-actions[bot]' + user_email: 'github-actions[bot]@users.noreply.github.com' + publish_branch: main + cname: coverage.abapgit.org + force_orphan: true + publish_dir: ./coverage \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4b819c2f5..fd5bbdb44 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,47 +1,36 @@ name: test on: - push: pull_request: jobs: - unit: + build: runs-on: ubuntu-latest - timeout-minutes: 5 + timeout-minutes: 10 steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: '16' + - name: npm install + run: | + npm install + npm run eslint + npm run merge + npm run merge.ci + test: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '16' + - name: npm install + run: npm install - name: npm run unit - run: | - npm install - npm run unit + run: npm run unit - name: npm run coverage - run: | - npm run coverage - - name: Update coverage.abapgit.org - uses: peaceiris/actions-gh-pages@v3 - if: github.ref == 'refs/heads/main' && github.repository == 'abapGit/abapGit' - with: - deploy_key: ${{ secrets.COVERAGE_DEPLOY_KEY }} - external_repository: abapGit/coverage.abapgit.org - user_name: 'github-actions[bot]' - user_email: 'github-actions[bot]@users.noreply.github.com' - publish_branch: main - cname: coverage.abapgit.org - force_orphan: true - publish_dir: ./coverage - integration: - needs: unit - runs-on: ubuntu-latest - timeout-minutes: 5 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: '16' + run: npm run coverage - name: npm run integration - run: | - npm install - npm run integration + run: npm run integration