Skip to content

chore: add the optional queryLanguage enum value where used #19

chore: add the optional queryLanguage enum value where used

chore: add the optional queryLanguage enum value where used #19

Workflow file for this run

name: Test Build
on:
workflow_dispatch:
# pull_request:
# push:
jobs:
run-unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
- name: Run Unit Tests
id: unit
run: |
make prepare
make test
make fmtcheck
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
- name: Build
id: build
run: |
make prepare
build-cross-platform
run-integration-tests:
runs-on: ubuntu-latest
steps:
# To wait for the existing nightly-build run to complete to avoid running same integration tests at the same time
- name: Turnstyle
uses: softprops/turnstyle@v1
with:
same-branch-only: false
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
- name: Run Integration Tests
id: integration
run: |
make prepare
make clean-test
make integration-test
slack-notify:
name: Slack Notify if Failed Tests
needs: [run-unit-tests, build, run-integration-tests]
runs-on: ubuntu-latest
if: needs.run-unit-tests.result == 'failure' || needs.build.result == 'failure' || needs.run-integration-tests.result == 'failure'
steps:
- name: Notify Slack on Failure
uses: slackapi/[email protected]
with:
payload: |
{
"attachments": [
{
"color": "#E92020",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "@oncall-growth-eng! There has been a failure that needs your attention. :rotating_light:\n*GitHub Workflow Failure <${{ github.server_url }}/${{ github.repository }}>*\n\n*Workflow Run*\n <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Workflow>"
}
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.TF_SLACK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
trigger-release:
if: github.ref == 'refs/heads/main'
needs: [run-unit-tests, build, run-integration-tests]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.TOKEN }}
- name: Trigger release
shell: bash
run: |
make prepare
echo "$GPG_SECRET_KEY" | base64 --decode | gpg --import --no-tty --batch --yes
make release
env:
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GITHUB_TOKEN: ${{ secrets.TOKEN }}
slack-notify-trigger-release:
name: Slack Notify if Failed Tests
needs: trigger-release
runs-on: ubuntu-latest
if: needs.trigger-release.result == 'failure'
steps:
- name: Notify Slack on Failure
uses: slackapi/[email protected]
with:
payload: |
{
"attachments": [
{
"color": "#E92020",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "@oncall-growth-eng! There has been a failure that needs your attention. :rotating_light:\n*GitHub Workflow Failure <${{ github.server_url }}/${{ github.repository }}>*\n\n*Workflow Run*\n <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Workflow>"
}
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.TF_SLACK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK