Skip to content

Commit

Permalink
chore: comment out code to test
Browse files Browse the repository at this point in the history
  • Loading branch information
PengyuanZhao committed Feb 23, 2024
1 parent 8e7aa64 commit 3c7dd32
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 85 deletions.
172 changes: 87 additions & 85 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,82 +11,84 @@ concurrency:
group: ${{ github.workflow }}

jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
# run-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: Setup Go
# uses: actions/setup-go@v4
# with:
# go-version: 1.21.x

- name: Run linting tests
id: update
run: |
make prepare
make lint
make fmt-check
make imports-check
# - name: Run linting tests
# id: update
# run: |
# make prepare
# make lint
# make fmt-check
# make imports-check

- name: Run unit tests
run: |
make coverage-ci
# - name: Run unit tests
# run: |
# make coverage-ci

- name: Build cross-platform binaries
run: |
make build-cli-cross-platform
# - name: Build cross-platform binaries
# run: |
# make build-cli-cross-platform

- name: Run integration tests
env:
CI_ACCOUNT: ${{ secrets.CI_ACCOUNT }}
CI_SUBACCOUNT: ${{ secrets.CI_SUBACCOUNT }}
CI_API_KEY: ${{ secrets.CI_API_KEY }}
CI_API_SECRET: ${{ secrets.CI_API_SECRET }}
LW_INT_TEST_AWS_ACC: ${{ secrets.LW_INT_TEST_AWS_ACC }}
run: |
sudo apt-get update
sudo apt-get install -y vim
make integration-only
# - name: Run integration tests
# env:
# CI_ACCOUNT: ${{ secrets.CI_ACCOUNT }}
# CI_SUBACCOUNT: ${{ secrets.CI_SUBACCOUNT }}
# CI_API_KEY: ${{ secrets.CI_API_KEY }}
# CI_API_SECRET: ${{ secrets.CI_API_SECRET }}
# LW_INT_TEST_AWS_ACC: ${{ secrets.LW_INT_TEST_AWS_ACC }}
# run: |
# sudo apt-get update
# sudo apt-get install -y vim
# make integration-only

# TODO Display test report
# # TODO Display test report

- name: Notify Slack on Failure
uses: slackapi/[email protected]
if: failure()
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*\ngo-sdk/test-build\n*Workflow Run*\n https://github.com/lacework/go-sdk/actions/runs/${{ github.run_id }}"
}
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GROWTH_ENG_ALERTS }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
# - name: Notify Slack on Failure
# uses: slackapi/[email protected]
# if: failure()
# 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*\ngo-sdk/test-build\n*Workflow Run*\n https://github.com/lacework/go-sdk/actions/runs/${{ github.run_id }}"
# }
# }
# ]
# }
# ]
# }
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GROWTH_ENG_ALERTS }}
# SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

trigger-release:
needs: run-tests
# needs: run-tests
# To test
# iif: github.ref_name == 'main'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: main

- name: Trigger release
env:
Expand All @@ -97,27 +99,27 @@ jobs:
echo "$GPG_SECRET_KEY" | base64 --decode | gpg --import --no-tty --batch --yes
scripts/release.sh trigger
- name: Notify Slack on Failure
uses: slackapi/[email protected]
if: failure()
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*\ngo-sdk/test-build\n*Workflow Run*\n https://github.com/lacework/go-sdk/actions/runs/${{ github.run_id }}"
}
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GROWTH_ENG_ALERTS }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
# - name: Notify Slack on Failure
# uses: slackapi/[email protected]
# if: failure()
# 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*\ngo-sdk/test-build\n*Workflow Run*\n https://github.com/lacework/go-sdk/actions/runs/${{ github.run_id }}"
# }
# }
# ]
# }
# ]
# }
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GROWTH_ENG_ALERTS }}
# SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
1 change: 1 addition & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ bump_version() {

log "commiting and pushing the vertion bump to github"
if [ "$CI" != "" ]; then
log "setting git user email, user name and signingkey"
git config --global user.email $git_email
git config --global user.name $git_user
git config --global user.signingkey $GPG_SIGNING_KEY
Expand Down

0 comments on commit 3c7dd32

Please sign in to comment.