Skip to content

Commit a45f0f5

Browse files
committed
Merge remote-tracking branch 'upstream/alpha'
2 parents eea1e2d + 921712a commit a45f0f5

39 files changed

+13210
-7695
lines changed

.github/pull_request_template.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ Related issue: #`FILL_THIS_OUT`
2323
-->
2424

2525
- [ ] Add tests
26-
- [ ] Add entry to changelog
27-
- [ ] Add changes to documentation (guides, repository pages, in-code descriptions)
26+
- [ ] Add changes to documentation (guides, repository pages, in-code descriptions)
27+
- [x] A changelog entry is created automatically using the pull request title (do not manually add a changelog entry)

.github/stale.yml

-25
This file was deleted.

.github/workflows/ci.yml

+147-22
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,156 @@ on:
66
pull_request:
77
branches:
88
- '**'
9+
env:
10+
NODE_VERSION: 16.10.0
911
jobs:
10-
check-changelog:
11-
name: Changelog
12+
check-ci:
13+
name: CI Self-Check
14+
timeout-minutes: 15
15+
runs-on: ubuntu-18.04
16+
steps:
17+
- name: Determine major node version
18+
id: node
19+
run: |
20+
node_major=$(echo "${{ env.NODE_VERSION }}" | cut -d'.' -f1)
21+
echo "::set-output name=node_major::$(echo $node_major)"
22+
- uses: actions/checkout@v2
23+
- name: Use Node.js ${{ env.NODE_VERSION }}
24+
uses: actions/setup-node@v1
25+
with:
26+
node-version: ${{ env.node-version }}
27+
- name: Cache Node.js modules
28+
uses: actions/cache@v2
29+
with:
30+
path: ~/.npm
31+
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
32+
restore-keys: |
33+
${{ runner.os }}-node-${{ env.NODE_VERSION }}-
34+
- name: Install dependencies
35+
run: npm ci
36+
- name: CI Environments Check
37+
run: npm run ci:check
38+
- name: CI Node Engine Check
39+
run: npm run ci:checkNodeEngine
40+
# check-lint:
41+
# name: Lint
42+
# timeout-minutes: 15
43+
# runs-on: ubuntu-18.04
44+
# steps:
45+
# - uses: actions/checkout@v2
46+
# - name: Use Node.js ${{ env.NODE_VERSION }}
47+
# uses: actions/setup-node@v1
48+
# with:
49+
# node-version: ${{ env.node-version }}
50+
# - name: Cache Node.js modules
51+
# uses: actions/cache@v2
52+
# with:
53+
# path: ~/.npm
54+
# key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
55+
# restore-keys: |
56+
# ${{ runner.os }}-node-${{ env.NODE_VERSION }}-
57+
# - name: Install dependencies
58+
# run: npm ci
59+
# - run: npm run lint
60+
check-circular:
61+
name: Circular Dependencies
62+
timeout-minutes: 5
63+
runs-on: ubuntu-18.04
64+
steps:
65+
- uses: actions/checkout@v2
66+
- name: Use Node.js ${{ env.NODE_VERSION }}
67+
uses: actions/setup-node@v1
68+
with:
69+
node-version: ${{ env.node-version }}
70+
- name: Cache Node.js modules
71+
uses: actions/cache@v2
72+
with:
73+
path: ~/.npm
74+
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
75+
restore-keys: |
76+
${{ runner.os }}-node-${{ env.NODE_VERSION }}-
77+
- name: Install dependencies
78+
run: npm ci
79+
- name: Scan for circular dependencies
80+
run: npm run madge:circular
81+
check-docker:
82+
strategy:
83+
matrix:
84+
include:
85+
- name: Docker linux/amd64
86+
DOCKER_PLATFORM: linux/amd64
87+
# Building currently fails for the platforms below
88+
# - name: Docker linux/arm/v6
89+
# DOCKER_PLATFORM: linux/arm/v6
90+
# - name: Docker linux/arm/v7
91+
# DOCKER_PLATFORM: linux/arm/v7
92+
# - name: Docker linux/arm64/v8
93+
# DOCKER_PLATFORM: linux/arm64/v8
94+
fail-fast: false
95+
name: ${{ matrix.name }}
96+
timeout-minutes: 15
97+
runs-on: ubuntu-18.04
98+
steps:
99+
- uses: actions/checkout@v2
100+
- name: Set up QEMU
101+
uses: docker/setup-qemu-action@v1
102+
- name: Set up Docker Buildx
103+
uses: docker/setup-buildx-action@v1
104+
- name: Build docker image
105+
uses: docker/build-push-action@v2
106+
with:
107+
platforms: ${{ matrix.DOCKER_PLATFORM }}
108+
check-lock-file-version:
109+
name: NPM Lock File Version
12110
timeout-minutes: 5
13111
runs-on: ubuntu-18.04
14112
steps:
15-
- uses: actions/checkout@v2
16-
- uses: dangoslen/changelog-enforcer@v2
17-
build:
113+
- uses: actions/checkout@v2
114+
- name: Check NPM lock file version
115+
uses: mansona/npm-lockfile-version@v1
116+
with:
117+
version: 1
118+
check-build:
119+
strategy:
120+
matrix:
121+
include:
122+
- name: Node 12
123+
NODE_VERSION: 12.22.6
124+
- name: Node 14
125+
NODE_VERSION: 14.18.0
126+
- name: Node 16
127+
NODE_VERSION: 16.10.0
128+
fail-fast: false
129+
name: ${{ matrix.name }}
130+
timeout-minutes: 15
18131
runs-on: ubuntu-18.04
19-
timeout-minutes: 30
132+
env:
133+
NODE_VERSION: ${{ matrix.NODE_VERSION }}
20134
steps:
21-
- uses: actions/checkout@v2
22-
- name: Use Node.js
23-
uses: actions/setup-node@v1
24-
with:
25-
node-version: '10.14'
26-
- name: Cache Node.js modules
27-
uses: actions/cache@v2
28-
with:
29-
path: ~/.npm
30-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
31-
restore-keys: |
32-
${{ runner.os }}-node-
33-
- run: npm ci
34-
- run: ./scripts/before_script.sh
35-
env:
36-
CI: true
135+
- name: Determine major node version
136+
id: node
137+
run: |
138+
node_major=$(echo "${{ matrix.NODE_VERSION }}" | cut -d'.' -f1)
139+
echo "::set-output name=node_major::$(echo $node_major)"
140+
- uses: actions/checkout@v2
141+
- name: Use Node.js ${{ matrix.NODE_VERSION }}
142+
uses: actions/setup-node@v1
143+
with:
144+
node-version: ${{ matrix.NODE_VERSION }}
145+
- name: Cache Node.js modules
146+
uses: actions/cache@v2
147+
with:
148+
path: ~/.npm
149+
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
150+
restore-keys: |
151+
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
152+
- name: Install dependencies (Node < 10)
153+
run: npm install
154+
if: ${{ steps.node.outputs.node_major < 10 }}
155+
- name: Install dependencies (Node >= 10)
156+
run: npm ci
157+
if: ${{ steps.node.outputs.node_major >= 10 }}
158+
- name: Test bundles
159+
run: ./scripts/before_script.sh
160+
env:
161+
CI: true
+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: release-automated
2+
on:
3+
push:
4+
branches: [ release, alpha, beta, next-major ]
5+
jobs:
6+
release:
7+
runs-on: ubuntu-latest
8+
outputs:
9+
current_tag: ${{ steps.tag.outputs.current_tag }}
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
persist-credentials: false
14+
- uses: actions/setup-node@v2
15+
with:
16+
node-version: 12
17+
registry-url: https://registry.npmjs.org/
18+
- name: Cache Node.js modules
19+
uses: actions/cache@v2
20+
with:
21+
path: ~/.npm
22+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
23+
restore-keys: |
24+
${{ runner.os }}-node-
25+
- run: npm ci
26+
- run: npx semantic-release
27+
env:
28+
GH_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
31+
- name: Determine tag on current commit
32+
id: tag
33+
run: echo "::set-output name=current_tag::$(git describe --tags --abbrev=0 --exact-match || echo '')"
34+
35+
docker:
36+
needs: release
37+
if: needs.release.outputs.current_tag != ''
38+
env:
39+
REGISTRY: docker.io
40+
IMAGE_NAME: parseplatform/parse-dashboard
41+
runs-on: ubuntu-18.04
42+
permissions:
43+
contents: read
44+
packages: write
45+
steps:
46+
- name: Determine branch name
47+
id: branch
48+
run: echo "::set-output name=branch_name::${GITHUB_REF#refs/*/}"
49+
- name: Checkout repository
50+
uses: actions/checkout@v2
51+
with:
52+
ref: ${{ needs.release.outputs.current_tag }}
53+
- name: Set up QEMU
54+
id: qemu
55+
uses: docker/setup-qemu-action@v1
56+
- name: Set up Docker Buildx
57+
uses: docker/setup-buildx-action@v1
58+
- name: Log into Docker Hub
59+
if: github.event_name != 'pull_request'
60+
uses: docker/login-action@v1
61+
with:
62+
username: ${{ secrets.DOCKERHUB_USERNAME }}
63+
password: ${{ secrets.DOCKERHUB_TOKEN }}
64+
- name: Extract Docker metadata
65+
id: meta
66+
uses: docker/metadata-action@v3
67+
with:
68+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
69+
flavor: |
70+
latest=${{ steps.branch.outputs.branch_name == 'release' }}
71+
tags: |
72+
type=semver,pattern={{version}},value=${{ needs.release.outputs.current_tag }}
73+
- name: Build and push Docker image
74+
uses: docker/build-push-action@v2
75+
with:
76+
context: .
77+
platforms: linux/amd64
78+
push: ${{ github.event_name != 'pull_request' }}
79+
tags: ${{ steps.meta.outputs.tags }}
80+
labels: ${{ steps.meta.outputs.labels }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Trigger this workflow only to manually create a Docker release; this should only be used
2+
# in extraordinary circumstances, as Docker releases are normally created automatically as
3+
# part of the automated release workflow.
4+
5+
name: release-manual-docker
6+
on:
7+
workflow_dispatch:
8+
inputs:
9+
ref:
10+
default: ''
11+
description: 'Reference (tag / SHA):'
12+
env:
13+
REGISTRY: docker.io
14+
IMAGE_NAME: parseplatform/parse-dashboard
15+
jobs:
16+
build:
17+
runs-on: ubuntu-18.04
18+
permissions:
19+
contents: read
20+
packages: write
21+
steps:
22+
- name: Determine branch name
23+
id: branch
24+
run: echo "::set-output name=branch_name::${GITHUB_REF#refs/*/}"
25+
- name: Checkout repository
26+
uses: actions/checkout@v2
27+
with:
28+
ref: ${{ github.event.inputs.ref }}
29+
- name: Set up QEMU
30+
id: qemu
31+
uses: docker/setup-qemu-action@v1
32+
- name: Set up Docker Buildx
33+
uses: docker/setup-buildx-action@v1
34+
- name: Log into Docker Hub
35+
if: github.event_name != 'pull_request'
36+
uses: docker/login-action@v1
37+
with:
38+
username: ${{ secrets.DOCKERHUB_USERNAME }}
39+
password: ${{ secrets.DOCKERHUB_TOKEN }}
40+
- name: Extract Docker metadata
41+
id: meta
42+
uses: docker/metadata-action@v3
43+
with:
44+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
45+
flavor: |
46+
latest=${{ steps.branch.outputs.branch_name == 'release' && github.event.inputs.ref == '' }}
47+
tags: |
48+
type=semver,enable=true,pattern={{version}},value=${{ github.event.inputs.ref }}
49+
type=raw,enable=${{ github.event.inputs.ref == '' }},value=latest
50+
- name: Build and push Docker image
51+
uses: docker/build-push-action@v2
52+
with:
53+
context: .
54+
platforms: linux/amd64
55+
push: ${{ github.event_name != 'pull_request' }}
56+
tags: ${{ steps.meta.outputs.tags }}
57+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/release.yml

-24
This file was deleted.

0 commit comments

Comments
 (0)