From 0ca1958e1ab8198c40ad952dac27ef0b9825385a Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 5 May 2023 00:21:48 +0200 Subject: [PATCH] Upgrade to Node 20 on CI, enable actions cancellation (#24524) - Upgrade node, the [snap](https://github.com/go-gitea/gitea/blob/7abe958f5b507efa676fb3b2e27d30517f6d1908/snap/snapcraft.yaml#L47) is excluded from this because [there is no Node 20 snap yet](https://snapcraft.io/node). - Add actions build cancellation based on [this](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value). --------- Co-authored-by: techknowlogick --- .drone.yml | 8 ++++---- .github/workflows/pull-compliance.yml | 8 ++++++-- .github/workflows/pull-compliance_docs.yml | 8 ++++++-- .github/workflows/pull-db_test.yml | 4 ++++ .github/workflows/pull-docker_dryrun.yml | 4 ++++ .github/workflows/pull-e2e.yml | 6 +++++- 6 files changed, 29 insertions(+), 9 deletions(-) diff --git a/.drone.yml b/.drone.yml index 7810d3d10..4e7789ef9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -33,7 +33,7 @@ steps: - git fetch --tags --force - name: deps-frontend - image: node:18 + image: node:20 pull: always commands: - make deps-frontend @@ -51,7 +51,7 @@ steps: image: techknowlogick/xgo:go-1.20.x pull: always commands: - # Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved + # Upgrade to node 20 once https://github.com/techknowlogick/xgo/issues/163 is resolved - curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get -qqy install nodejs - export PATH=$PATH:$GOPATH/bin - make release @@ -161,7 +161,7 @@ steps: - git fetch --tags --force - name: deps-frontend - image: node:18 + image: node:20 pull: always commands: - make deps-frontend @@ -179,7 +179,7 @@ steps: image: techknowlogick/xgo:go-1.20.x pull: always commands: - # Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved + # Upgrade to node 20 once https://github.com/techknowlogick/xgo/issues/163 is resolved - curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get -qqy install nodejs - export PATH=$PATH:$GOPATH/bin - make release diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/pull-compliance.yml index 1239b9caa..94ca850e8 100644 --- a/.github/workflows/pull-compliance.yml +++ b/.github/workflows/pull-compliance.yml @@ -2,6 +2,10 @@ name: "Pull: Compliance Tests" on: [pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: lint_basic: runs-on: ubuntu-latest @@ -79,7 +83,7 @@ jobs: - name: setup node uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 - name: deps-frontend run: make deps-frontend - name: lint frontend @@ -100,7 +104,7 @@ jobs: - name: setup node uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 - name: deps-backend run: make deps-backend deps-tools - name: deps-frontend diff --git a/.github/workflows/pull-compliance_docs.yml b/.github/workflows/pull-compliance_docs.yml index 679e92551..c033b6271 100644 --- a/.github/workflows/pull-compliance_docs.yml +++ b/.github/workflows/pull-compliance_docs.yml @@ -6,6 +6,10 @@ on: - "docs/**" - "*.md" +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: compliance-docs: runs-on: ubuntu-latest @@ -13,9 +17,9 @@ jobs: - name: checkout uses: actions/checkout@v3 - name: setup node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 - name: install dependencies run: make deps-frontend - name: lint markdown diff --git a/.github/workflows/pull-db_test.yml b/.github/workflows/pull-db_test.yml index 3cae4df03..ce97bfcb2 100644 --- a/.github/workflows/pull-db_test.yml +++ b/.github/workflows/pull-db_test.yml @@ -2,6 +2,10 @@ name: "Pull: Database Tests" on: [pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: # PostgreSQL Tests db_pgsql_test: diff --git a/.github/workflows/pull-docker_dryrun.yml b/.github/workflows/pull-docker_dryrun.yml index 8e5acb3ce..f17d6014b 100644 --- a/.github/workflows/pull-docker_dryrun.yml +++ b/.github/workflows/pull-docker_dryrun.yml @@ -2,6 +2,10 @@ name: "Pull: Docker Dry Run" on: [pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: docker_dryrun: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-e2e.yml b/.github/workflows/pull-e2e.yml index 2cd6bd0d6..37fc94fd9 100644 --- a/.github/workflows/pull-e2e.yml +++ b/.github/workflows/pull-e2e.yml @@ -2,6 +2,10 @@ name: "Pull: E2E Tests" on: [pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: e2e_tests: runs-on: ubuntu-latest @@ -15,7 +19,7 @@ jobs: - name: setup node uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 - name: build run: make deps-frontend frontend deps-backend - name: Install playwright browsers