Serializable failure with recursion for DoTransaction on this error, and transaction aborted error handled #113
Workflow file for this run
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
# SPDX-License-Identifier: ice License 1.0 | |
name: CI/CD | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
permissions: | |
contents: write | |
jobs: | |
verify-licensing: | |
name: Verify Licensing | |
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.draft == false) || github.event_name == 'push' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Find latest Go Version | |
id: findLatestGoVersion | |
run: | | |
LATEST_GO_VERSION=$(make latestGoVersion) | |
echo "::set-output name=latestGoVersion::$LATEST_GO_VERSION" | |
- name: Setup GO | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ steps.findLatestGoVersion.outputs.latestGoVersion }} | |
- name: Check License | |
run: make checkLicense | |
- name: Slack Notification For Failure/Cancellation | |
if: ${{ github.event_name == 'push' && (failure() || cancelled()) }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.BACKEND_SLACK_WEBHOOK }} | |
SLACK_TITLE: CI Failed> ${{ job.status }} | |
SLACK_USERNAME: ${{ github.event.repository.name }}-ci-bot | |
SLACK_ICON: https://avatars.githubusercontent.com/u/102382658?s=400&u=62e73f4cb845c48a07a19e03c6f84b721e40c0a6&v=4 | |
SLACK_ICON_EMOJI: ':sob:' | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_FOOTER: | | |
https://github.com/ice-blockchain/${{ github.event.repository.name }} | |
verify-latest-versions-used: | |
name: Verify Latest Versions | |
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.draft == false) || github.event_name == 'push' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Find latest Go Version | |
id: findLatestGoVersion | |
run: | | |
LATEST_GO_VERSION=$(make latestGoVersion) | |
echo "::set-output name=latestGoVersion::$LATEST_GO_VERSION" | |
- name: Setup GO | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ steps.findLatestGoVersion.outputs.latestGoVersion }} | |
- name: Check If We're Up to Date with Everything | |
run: make checkModVersion checkIfAllDependenciesAreUpToDate | |
- name: Slack Notification For Failure/Cancellation | |
if: ${{ github.event_name == 'push' && (failure() || cancelled()) }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.BACKEND_SLACK_WEBHOOK }} | |
SLACK_TITLE: CI Failed> ${{ job.status }} | |
SLACK_USERNAME: ${{ github.event.repository.name }}-ci-bot | |
SLACK_ICON: https://avatars.githubusercontent.com/u/102382658?s=400&u=62e73f4cb845c48a07a19e03c6f84b721e40c0a6&v=4 | |
SLACK_ICON_EMOJI: ':sob:' | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_FOOTER: | | |
https://github.com/ice-blockchain/${{ github.event.repository.name }} | |
verify-auto-generated: | |
name: Verify Auto Generated | |
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.draft == false) || github.event_name == 'push' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Find latest Go Version | |
id: findLatestGoVersion | |
run: | | |
LATEST_GO_VERSION=$(make latestGoVersion) | |
echo "::set-output name=latestGoVersion::$LATEST_GO_VERSION" | |
- name: Setup GO | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ steps.findLatestGoVersion.outputs.latestGoVersion }} | |
- name: Check Auto Generated Files | |
run: make checkGenerated | |
- name: Slack Notification For Failure/Cancellation | |
if: ${{ github.event_name == 'push' && (failure() || cancelled()) }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.BACKEND_SLACK_WEBHOOK }} | |
SLACK_TITLE: CI Failed> ${{ job.status }} | |
SLACK_USERNAME: ${{ github.event.repository.name }}-ci-bot | |
SLACK_ICON: https://avatars.githubusercontent.com/u/102382658?s=400&u=62e73f4cb845c48a07a19e03c6f84b721e40c0a6&v=4 | |
SLACK_ICON_EMOJI: ':sob:' | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_FOOTER: | | |
https://github.com/ice-blockchain/${{ github.event.repository.name }} | |
lint: | |
name: Lint | |
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.draft == false) || github.event_name == 'push' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Find latest Go Version | |
id: findLatestGoVersion | |
run: | | |
LATEST_GO_VERSION=$(make latestGoVersion) | |
echo "::set-output name=latestGoVersion::$LATEST_GO_VERSION" | |
- name: Setup GO | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ steps.findLatestGoVersion.outputs.latestGoVersion }} | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: latest | |
- name: Slack Notification For Failure/Cancellation | |
if: ${{ github.event_name == 'push' && (failure() || cancelled()) }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.BACKEND_SLACK_WEBHOOK }} | |
SLACK_TITLE: CI Failed> ${{ job.status }} | |
SLACK_USERNAME: ${{ github.event.repository.name }}-ci-bot | |
SLACK_ICON: https://avatars.githubusercontent.com/u/102382658?s=400&u=62e73f4cb845c48a07a19e03c6f84b721e40c0a6&v=4 | |
SLACK_ICON_EMOJI: ':sob:' | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_FOOTER: | | |
https://github.com/ice-blockchain/${{ github.event.repository.name }} | |
build: | |
name: Build | |
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.draft == false) || github.event_name == 'push' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Find latest Go Version | |
id: findLatestGoVersion | |
run: | | |
LATEST_GO_VERSION=$(make latestGoVersion) | |
echo "::set-output name=latestGoVersion::$LATEST_GO_VERSION" | |
- name: Setup GO | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ steps.findLatestGoVersion.outputs.latestGoVersion }} | |
- name: Build all | |
run: make build-all@ci/cd | |
- name: Slack Notification For Failure/Cancellation | |
if: ${{ github.event_name == 'push' && (failure() || cancelled()) }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.BACKEND_SLACK_WEBHOOK }} | |
SLACK_TITLE: CI Failed> ${{ job.status }} | |
SLACK_USERNAME: ${{ github.event.repository.name }}-ci-bot | |
SLACK_ICON: https://avatars.githubusercontent.com/u/102382658?s=400&u=62e73f4cb845c48a07a19e03c6f84b721e40c0a6&v=4 | |
SLACK_ICON_EMOJI: ':sob:' | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_FOOTER: | | |
https://github.com/ice-blockchain/${{ github.event.repository.name }} | |
test: | |
name: Test | |
strategy: | |
matrix: | |
package: | |
- coin | |
- time | |
- privacy | |
- translations | |
- multimedia/picture | |
- analytics/tracking | |
- notifications/push | |
- auth | |
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.draft == false) || github.event_name == 'push' }} | |
runs-on: ubuntu-latest | |
# runs-on: self-hosted-ubuntu-latest-x64 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Find latest Go Version | |
id: findLatestGoVersion | |
run: | | |
LATEST_GO_VERSION=$(make latestGoVersion) | |
echo "::set-output name=latestGoVersion::$LATEST_GO_VERSION" | |
- name: Setup GO | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ steps.findLatestGoVersion.outputs.latestGoVersion }} | |
- name: Test ${{ matrix.package }} | |
env: | |
SMS_CLIENT_USER: ${{ secrets.SMS_CLIENT_USER }} | |
SMS_CLIENT_PASSWORD: ${{ secrets.SMS_CLIENT_PASSWORD }} | |
EMAIL_CLIENT_APIKEY: ${{ secrets.EMAIL_CLIENT_APIKEY }} | |
PICTURE_STORAGE_ACCESS_KEY: ${{ secrets.PICTURE_STORAGE_ACCESS_KEY }} | |
INAPP_NOTIFICATIONS_CLIENT_KEY: ${{ secrets.INAPP_NOTIFICATIONS_CLIENT_KEY }} | |
INAPP_NOTIFICATIONS_CLIENT_SECRET: ${{ secrets.INAPP_NOTIFICATIONS_CLIENT_SECRET }} | |
INAPP_NOTIFICATIONS_CLIENT_APP_ID: ${{ secrets.INAPP_NOTIFICATIONS_CLIENT_APP_ID }} | |
ANALYTICS_TRACKING_API_KEY: ${{ secrets.ANALYTICS_TRACKING_API_KEY }} | |
ANALYTICS_TRACKING_APP_ID: ${{ secrets.ANALYTICS_TRACKING_APP_ID }} | |
TRANSLATIONS_CLIENT_APIKEY: ${{ secrets.TRANSLATIONS_CLIENT_APIKEY }} | |
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} | |
GCP_FIREBASE_AUTH_API_KEY: ${{ secrets.GCP_FIREBASE_AUTH_API_KEY }} | |
run: | | |
cd ${{ matrix.package }} | |
make -f ${{ github.workspace }}/Makefile test@ci/cd | |
make -f ${{ github.workspace }}/Makefile coverage | |
- name: Slack Notification For Failure/Cancellation | |
if: ${{ github.event_name == 'push' && (failure() || cancelled()) }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.BACKEND_SLACK_WEBHOOK }} | |
SLACK_TITLE: CI Failed> ${{ job.status }} | |
SLACK_USERNAME: ${{ github.event.repository.name }}-ci-bot | |
SLACK_ICON: https://avatars.githubusercontent.com/u/102382658?s=400&u=62e73f4cb845c48a07a19e03c6f84b721e40c0a6&v=4 | |
SLACK_ICON_EMOJI: ':sob:' | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_FOOTER: | | |
wintr/${{ matrix.package }} | |
https://github.com/ice-blockchain/${{ github.event.repository.name }} | |
benchmark: | |
name: Benchmark | |
strategy: | |
matrix: | |
package: | |
- coin | |
- time | |
- privacy | |
- translations | |
- multimedia/picture | |
- analytics/tracking | |
- notifications/push | |
- auth | |
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.draft == false) || github.event_name == 'push' }} | |
runs-on: ubuntu-latest | |
# runs-on: self-hosted-ubuntu-latest-x64 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Find latest Go Version | |
id: findLatestGoVersion | |
run: | | |
LATEST_GO_VERSION=$(make latestGoVersion) | |
echo "::set-output name=latestGoVersion::$LATEST_GO_VERSION" | |
- name: Setup GO | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ steps.findLatestGoVersion.outputs.latestGoVersion }} | |
- name: Benchmark ${{ matrix.package }} | |
env: | |
SMS_CLIENT_USER: ${{ secrets.SMS_CLIENT_USER }} | |
SMS_CLIENT_PASSWORD: ${{ secrets.SMS_CLIENT_PASSWORD }} | |
EMAIL_CLIENT_APIKEY: ${{ secrets.EMAIL_CLIENT_APIKEY }} | |
PICTURE_STORAGE_ACCESS_KEY: ${{ secrets.PICTURE_STORAGE_ACCESS_KEY }} | |
INAPP_NOTIFICATIONS_CLIENT_KEY: ${{ secrets.INAPP_NOTIFICATIONS_CLIENT_KEY }} | |
INAPP_NOTIFICATIONS_CLIENT_SECRET: ${{ secrets.INAPP_NOTIFICATIONS_CLIENT_SECRET }} | |
INAPP_NOTIFICATIONS_CLIENT_APP_ID: ${{ secrets.INAPP_NOTIFICATIONS_CLIENT_APP_ID }} | |
ANALYTICS_TRACKING_API_KEY: ${{ secrets.ANALYTICS_TRACKING_API_KEY }} | |
ANALYTICS_TRACKING_APP_ID: ${{ secrets.ANALYTICS_TRACKING_APP_ID }} | |
TRANSLATIONS_CLIENT_APIKEY: ${{ secrets.TRANSLATIONS_CLIENT_APIKEY }} | |
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} | |
GCP_FIREBASE_AUTH_API_KEY: ${{ secrets.GCP_FIREBASE_AUTH_API_KEY }} | |
run: | | |
cd ${{ matrix.package }} | |
make -f ${{ github.workspace }}/Makefile benchmark@ci/cd | |
- name: Slack Notification For Failure/Cancellation | |
if: ${{ github.event_name == 'push' && (failure() || cancelled()) }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.BACKEND_SLACK_WEBHOOK }} | |
SLACK_TITLE: CI Failed> ${{ job.status }} | |
SLACK_USERNAME: ${{ github.event.repository.name }}-ci-bot | |
SLACK_ICON: https://avatars.githubusercontent.com/u/102382658?s=400&u=62e73f4cb845c48a07a19e03c6f84b721e40c0a6&v=4 | |
SLACK_ICON_EMOJI: ':sob:' | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_FOOTER: | | |
wintr/${{ matrix.package }} | |
https://github.com/ice-blockchain/${{ github.event.repository.name }} | |
PR: | |
needs: [ verify-licensing, verify-latest-versions-used, verify-auto-generated, lint, build, test, benchmark ] | |
name: PR | |
if: ${{ always() && (github.event_name == 'pull_request' && github.event.pull_request.draft == false) || github.event_name == 'push' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checking if all previous jobs were successful | |
env: | |
ALL_SUCCESSFUL: ${{ contains(join(needs.*.result, ','), 'failure') == false && contains(join(needs.*.result, ','), 'cancelled') == false && contains(join(needs.*.result, ','), 'skipped') == false }} | |
run: | | |
if [ $ALL_SUCCESSFUL == 'true' ] | |
then | |
exit 0 | |
else | |
exit 1 | |
fi | |
- name: Slack Notification For Failure/Cancellation | |
if: ${{ github.event_name == 'push' && (failure() || cancelled()) }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.BACKEND_SLACK_WEBHOOK }} | |
SLACK_TITLE: CI Failed> ${{ job.status }} | |
SLACK_USERNAME: ${{ github.event.repository.name }}-ci-bot | |
SLACK_ICON: https://avatars.githubusercontent.com/u/102382658?s=400&u=62e73f4cb845c48a07a19e03c6f84b721e40c0a6&v=4 | |
SLACK_ICON_EMOJI: ':sob:' | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_FOOTER: | | |
https://github.com/ice-blockchain/${{ github.event.repository.name }} | |
release: | |
needs: [ PR ] | |
name: Release | |
if: ${{ github.event_name == 'push' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Compute new Tag version | |
id: compute_tag | |
uses: craig-day/compute-tag@v13 | |
with: | |
github_token: ${{ github.token }} | |
version_type: minor | |
- id: check_tag | |
name: Check new computed Tag version | |
run: | | |
NEW_TAG_VERSION=$(echo "$NEW_TAG_VERSION" | sed 's/.\{2\}$//') | |
if [ $NEW_TAG_VERSION == 'v1.0.0' ] | |
then | |
echo "::set-output name=next_tag::$NEW_TAG_VERSION" | |
else | |
echo "::set-output name=next_tag::${NEW_TAG_VERSION}.0" | |
fi | |
env: | |
NEW_TAG_VERSION: ${{ steps.compute_tag.outputs.next_tag }} | |
- name: Create Release | |
id: create_release | |
#TODO This needs to be replaced ASAP! https://github.com/actions/create-release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.check_tag.outputs.next_tag }} | |
release_name: ${{ steps.check_tag.outputs.next_tag }} | |
draft: false | |
prerelease: false | |
- name: Slack Notification For Success | |
if: ${{ success() }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.BACKEND_SLACK_WEBHOOK }} | |
SLACK_TITLE: CI Succeeded | |
SLACK_USERNAME: ${{ github.event.repository.name }}-ci-bot | |
SLACK_ICON: https://avatars.githubusercontent.com/u/102382658?s=400&u=62e73f4cb845c48a07a19e03c6f84b721e40c0a6&v=4 | |
SLACK_ICON_EMOJI: ':rocket:' | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_FOOTER: | | |
https://github.com/ice-blockchain/${{ github.event.repository.name }} | |
- name: Slack Notification For Failure/Cancellation | |
if: ${{ github.event_name == 'push' && (failure() || cancelled()) }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.BACKEND_SLACK_WEBHOOK }} | |
SLACK_TITLE: CI Failed> ${{ job.status }} | |
SLACK_USERNAME: ${{ github.event.repository.name }}-ci-bot | |
SLACK_ICON: https://avatars.githubusercontent.com/u/102382658?s=400&u=62e73f4cb845c48a07a19e03c6f84b721e40c0a6&v=4 | |
SLACK_ICON_EMOJI: ':sob:' | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_FOOTER: | | |
https://github.com/ice-blockchain/${{ github.event.repository.name }} |