From 2c671d76f3f3af0d7283b9bedc01052654fc5a85 Mon Sep 17 00:00:00 2001 From: Viktor Varland Date: Fri, 6 Nov 2020 16:00:47 +0100 Subject: [PATCH] fix: cut release to finish migration to jira --- .github/workflows/dhis2-verify-node.yml | 91 +++++++++++++++++++++++++ .github/workflows/node-lint.yml | 23 ------- .github/workflows/node-publish.yml | 49 ------------- .github/workflows/node-test.yml | 21 ------ 4 files changed, 91 insertions(+), 93 deletions(-) create mode 100644 .github/workflows/dhis2-verify-node.yml delete mode 100644 .github/workflows/node-lint.yml delete mode 100644 .github/workflows/node-publish.yml delete mode 100644 .github/workflows/node-test.yml diff --git a/.github/workflows/dhis2-verify-node.yml b/.github/workflows/dhis2-verify-node.yml new file mode 100644 index 00000000..1eb44856 --- /dev/null +++ b/.github/workflows/dhis2-verify-node.yml @@ -0,0 +1,91 @@ +name: 'dhis2: verify (node)' + +on: + push: + branches: + +env: + GIT_AUTHOR_NAME: '@dhis2-bot' + GIT_AUTHOR_EMAIL: 'apps@dhis2.org' + GIT_COMMITTER_NAME: '@dhis2-bot' + GIT_COMMITTER_EMAIL: 'apps@dhis2.org' + NPM_TOKEN: ${{secrets.DHIS2_BOT_NPM_TOKEN}} + GH_TOKEN: ${{secrets.DHIS2_BOT_GITHUB_TOKEN}} + CI: true + +jobs: + install: + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, '[skip ci]')" + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12.x + + - uses: actions/cache@v2 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: '**/node_modules' + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + + - name: Install + if: steps.yarn-cache.outputs.cache-hit != 'true' + run: yarn install --frozen-lockfile + + lint: + runs-on: ubuntu-latest + needs: install + if: "!contains(github.event.head_commit.message, '[skip ci]')" + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12.x + + - uses: actions/cache@v2 + id: yarn-cache + with: + path: '**/node_modules' + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + + - name: Lint + run: yarn lint + + test: + runs-on: ubuntu-latest + needs: install + if: "!contains(github.event.head_commit.message, '[skip ci]')" + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12.x + + - uses: actions/cache@v2 + id: yarn-cache + with: + path: '**/node_modules' + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + + - name: Smoke + run: ./packages/main/bin/d2 debug system + + - name: Test + run: yarn test + + publish: + runs-on: ubuntu-latest + needs: [install, lint, test] + if: "!contains(github.event.head_commit.message, '[skip ci]')" + steps: + - uses: actions/checkout@v2 + with: + token: ${{env.GH_TOKEN}} + - uses: actions/setup-node@v1 + with: + node-version: 12.x + + - name: Publish to NPM + run: ./packages/main/bin/d2 utils release --publish npm diff --git a/.github/workflows/node-lint.yml b/.github/workflows/node-lint.yml deleted file mode 100644 index e8f9ca5c..00000000 --- a/.github/workflows/node-lint.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: 'dhis2-node lint' - -on: push - -jobs: - check: - runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, '[skip ci]')" - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12.x - - - name: Install - run: yarn install --frozen-lockfile - - - name: Run linters - run: | - npx d2-style js check - npx d2-style text check - env: - CI: true diff --git a/.github/workflows/node-publish.yml b/.github/workflows/node-publish.yml deleted file mode 100644 index d2f6a372..00000000 --- a/.github/workflows/node-publish.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: 'dhis2-node publish' - -on: - push: - branches: - # match branches in: - # https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#branches - - master - - next - - next-major - - alpha - - beta - - '[0-9]+.x' - - '[0-9]+.x.x' - - '[0-9]+.[0-9]+.x' - -env: - GIT_AUTHOR_NAME: '@dhis2-bot' - GIT_AUTHOR_EMAIL: 'apps@dhis2.org' - GIT_COMMITTER_NAME: '@dhis2-bot' - GIT_COMMITTER_EMAIL: 'apps@dhis2.org' - NPM_TOKEN: ${{secrets.NPM_TOKEN}} - GH_TOKEN: ${{secrets.GH_TOKEN}} - -jobs: - publish: - runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, '[skip ci]')" - steps: - - uses: actions/checkout@v2 - with: - token: ${{env.GH_TOKEN}} - - uses: actions/setup-node@v1 - with: - node-version: 12.x - - - name: Install - run: yarn install --frozen-lockfile - - - name: Smoke - run: ./packages/main/bin/d2 debug system - - - name: Test - run: yarn test - - - name: Publish to NPM - run: ./packages/main/bin/d2 utils release --publish npm - env: - CI: true diff --git a/.github/workflows/node-test.yml b/.github/workflows/node-test.yml deleted file mode 100644 index 8a795ffe..00000000 --- a/.github/workflows/node-test.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: 'dhis2-node test' - -on: push - -jobs: - unit: - runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, '[skip ci]')" - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12.x - - - name: Install - run: yarn install --frozen-lockfile - - - name: Test - run: yarn test - env: - CI: true