-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:island-is/island.is into j-s/sms-em…
…ail-config
- Loading branch information
Showing
400 changed files
with
9,930 additions
and
8,827 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,27 +54,27 @@ runs: | |
# force-cache-save: ${{ inputs.force-cache-save }} | ||
|
||
- name: Give cache server a bit of time to recover | ||
if: always() && inputs.retry > 0 && steps.cache_try_number_one.outputs.success != 'true' | ||
if: ${{ !cancelled() && inputs.retry > 0 && steps.cache_try_number_one.outputs.success != 'true' }} | ||
shell: bash | ||
run: sleep 10 | ||
|
||
- name: Cache try number two | ||
id: cache_try_number_two | ||
if: always() && inputs.retry > 0 && steps.cache_try_number_one.outputs.success != 'true' | ||
if: ${{ !cancelled() && inputs.retry > 0 && steps.cache_try_number_one.outputs.success != 'true' }} | ||
uses: island-is/[email protected] | ||
with: | ||
path: ${{ inputs.path }} | ||
key: ${{ inputs.key }} | ||
# force-cache-save: ${{ inputs.force-cache-save }} | ||
|
||
- name: Give cache server a bit of time to recover | ||
if: always() && inputs.retry > 1 && steps.cache_try_number_one.outputs.success != 'true' && steps.cache_try_number_two.outputs.success != 'true' | ||
if: ${{ !cancelled() && inputs.retry > 1 && steps.cache_try_number_one.outputs.success != 'true' && steps.cache_try_number_two.outputs.success != 'true' }} | ||
shell: bash | ||
run: sleep 10 | ||
|
||
- name: Cache try number three | ||
id: cache_try_number_three | ||
if: always() && inputs.retry > 1 && steps.cache_try_number_one.outputs.success != 'true' && steps.cache_try_number_two.outputs.success != 'true' | ||
if: ${{ !cancelled() && inputs.retry > 1 && steps.cache_try_number_one.outputs.success != 'true' && steps.cache_try_number_two.outputs.success != 'true' }} | ||
uses: island-is/[email protected] | ||
with: | ||
path: ${{ inputs.path }} | ||
|
@@ -83,7 +83,7 @@ runs: | |
|
||
- name: Gather outputs | ||
id: computed_outputs | ||
if: always() | ||
if: ${{ always() }} # We want to always report status, even when cancelled | ||
shell: bash | ||
run: | | ||
if [[ "${{ steps.cache_try_number_one.outputs.success }}" == "true" ]] || \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,19 +52,21 @@ jobs: | |
|
||
- name: Check node version | ||
run: | | ||
set -euo pipefail | ||
node -v | ||
ls -l `which node` | ||
- name: Checking out relevant branches | ||
run: | | ||
git checkout $GITHUB_HEAD_REF | ||
git checkout $GITHUB_BASE_REF | ||
git checkout $GITHUB_SHA | ||
set -euo pipefail | ||
git checkout "$GITHUB_HEAD_REF" | ||
git checkout "$GITHUB_BASE_REF" | ||
git checkout "$GITHUB_SHA" | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "CI Bot" | ||
BASE_SHA=$(git merge-base HEAD $GITHUB_BASE_REF) | ||
HEAD_SHA=$(git merge-base HEAD $GITHUB_HEAD_REF) | ||
echo Current base SHA is $BASE_SHA and head SHA is $HEAD_SHA | ||
BASE_SHA="$(git merge-base HEAD "$GITHUB_BASE_REF")" | ||
HEAD_SHA="$(git merge-base HEAD "$GITHUB_HEAD_REF")" | ||
echo "Current base SHA is '$BASE_SHA' and head SHA is '$HEAD_SHA'" | ||
echo "{\"base_sha\": \"$BASE_SHA\", \"head_sha\":\"$HEAD_SHA\"}" > event.json | ||
# This is to increase the retention days for our GitHub Actions run events | ||
|
@@ -85,15 +87,16 @@ jobs: | |
enable-cache: 'node_modules,cypress,generated-files' | ||
|
||
- run: | | ||
echo "HEAD=$GITHUB_SHA" >> $GITHUB_ENV | ||
set -euo pipefail | ||
echo "HEAD=$GITHUB_SHA" >> "$GITHUB_ENV" | ||
export HEAD_REF="$GITHUB_HEAD_REF" | ||
export BASE_REF="$GITHUB_BASE_REF" | ||
export PR_REF=$GITHUB_SHA | ||
export PR_REF="$GITHUB_SHA" | ||
export SHELL=/usr/bin/bash | ||
export WORKFLOW_ID=pullrequest | ||
source ./scripts/ci/00_prepare-base-tags.sh $(git merge-base HEAD $GITHUB_BASE_REF) | ||
git checkout $GITHUB_SHA | ||
echo "BASE=$BASE" >> $GITHUB_ENV | ||
source ./scripts/ci/00_prepare-base-tags.sh "$(git merge-base HEAD "$GITHUB_BASE_REF")" | ||
git checkout "$GITHUB_SHA" | ||
echo "BASE=$BASE" >> "$GITHUB_ENV" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
HTML_URL: ${{ github.event.pull_request.html_url }} | ||
|
@@ -110,56 +113,61 @@ jobs: | |
- name: Set magic env if test-everything label is set | ||
if: ${{ contains(github.event.pull_request.labels.*.name, 'test everything') && steps.check-permission.outputs['user-permission'] == 'admin' }} | ||
run: | | ||
echo "AFFECTED_ALL=7913-$GITHUB_HEAD_REF" >> $GITHUB_ENV | ||
echo "AFFECTED_ALL=7913-$GITHUB_HEAD_REF" >> "$GITHUB_ENV" | ||
- name: Warn if user does not have the required permissions | ||
if: ${{ contains(github.event.pull_request.labels.*.name, 'test everything') && steps.check-permission.outputs['user-permission'] != 'admin' }} | ||
run: | | ||
echo "## WARN permissions" >> "$GITHUB_STEP_SUMMARY" | ||
echo "User $GITHUB_ACTOR does not have the required permissions to apply the 'test everything' label" >> "$GITHUB_STEP_SUMMARY" | ||
echo "User '$GITHUB_ACTOR' does not have the required permissions to apply the 'test everything' label" >> "$GITHUB_STEP_SUMMARY" | ||
- name: Prepare lint targets | ||
id: lint_projects | ||
run: | | ||
CHUNKS=$(./scripts/ci/generate-chunks.sh lint) | ||
if [[ $CHUNKS != "[]" ]]; then | ||
echo "CHUNKS={\"projects\":$CHUNKS}" >> $GITHUB_OUTPUT | ||
set -euo pipefail | ||
CHUNKS="$(./scripts/ci/generate-chunks.sh lint)" | ||
if [[ "$CHUNKS" != "[]" ]]; then | ||
echo "CHUNKS={\"projects\":$CHUNKS}" >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: Prepare test targets | ||
id: test_projects | ||
run: | | ||
CHUNKS=$(./scripts/ci/generate-chunks.sh test) | ||
if [[ $CHUNKS != "[]" ]]; then | ||
echo "CHUNKS={\"projects\":$CHUNKS}" >> $GITHUB_OUTPUT | ||
set -euo pipefail | ||
CHUNKS="$(./scripts/ci/generate-chunks.sh test)" | ||
if [[ "$CHUNKS" != "[]" ]]; then | ||
echo "CHUNKS={\"projects\":$CHUNKS}" >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: Prepare e2e targets | ||
id: e2e_projects | ||
env: | ||
CHUNK_SIZE: 1 | ||
run: | | ||
CHUNKS=$(./scripts/ci/generate-chunks.sh e2e-ci) | ||
if [[ $CHUNKS != "[]" ]]; then | ||
echo "CHUNKS={\"projects\":$CHUNKS}" >> $GITHUB_OUTPUT | ||
set -euo pipefail | ||
CHUNKS="$(./scripts/ci/generate-chunks.sh e2e-ci)" | ||
if [[ "$CHUNKS" != "[]" ]]; then | ||
echo "CHUNKS={\"projects\":$CHUNKS}" >> "$GITHUB_OUTPUT" | ||
fi | ||
echo "BUILD_ID=$GITHUB_RUN_ID-$GITHUB_RUN_NUMBER-$(uuidgen)" >> $GITHUB_OUTPUT | ||
echo BUILD_ID="$GITHUB_RUN_ID-$GITHUB_RUN_NUMBER-$(uuidgen)" >> "$GITHUB_OUTPUT" | ||
- name: Prepare build targets | ||
id: build_projects | ||
env: | ||
CHUNK_SIZE: 4 | ||
run: | | ||
CHUNKS=$(./scripts/ci/generate-chunks.sh build) | ||
if [[ $CHUNKS != "[]" ]]; then | ||
echo "CHUNKS={\"projects\":$CHUNKS}" >> $GITHUB_OUTPUT | ||
set -euo pipefail | ||
CHUNKS="$(./scripts/ci/generate-chunks.sh build)" | ||
if [[ "$CHUNKS" != "[]" ]]; then | ||
echo "CHUNKS={\"projects\":$CHUNKS}" >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: Check release-manager approval | ||
id: check-release-manager-approval | ||
if: ${{ contains(github.event.pull_request.labels.*.name, 'automerge') && contains(github.event.pull_request.head.ref, '/pre-release/') }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
set -euo pipefail | ||
node -r esbuild-register .github/actions/check-team-approval.ts release-managers | ||
tests: | ||
needs: | ||
|
@@ -240,7 +248,7 @@ jobs: | |
enable-cache: 'node_modules,cypress,generated-files' | ||
|
||
- name: Running e2e tests | ||
run: ./scripts/ci/40_e2e.sh ${AFFECTED_PROJECT} | ||
run: ./scripts/ci/40_e2e.sh "${AFFECTED_PROJECT}" | ||
|
||
linting-workspace: | ||
needs: | ||
|
@@ -391,7 +399,7 @@ jobs: | |
runs-on: ec2-runners | ||
container: | ||
image: public.ecr.aws/m3u4c4h9/island-is/actions-runner-public:latest | ||
if: always() | ||
if: ${{ !cancelled() }} | ||
needs: | ||
- prepare | ||
- linting-workspace | ||
|
Oops, something went wrong.