Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Create workflow nightly-build.yml #1535

Merged
merged 4 commits into from
Feb 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Nightly Build

on:
schedule:
- cron: '0 10 * * *' # Run every day at 10AM UTC

jobs:
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: 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: 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 }}
# need vim for integrations test of inline editing LQL queries
run: |
sudo apt-get update
sudo apt-get install -y vim
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we install vim?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vim is needed for integrations test of inline editing LQL queries. There is a ticket for having a docker image for this: https://lacework.atlassian.net/browse/GROW-924

make integration-only

- name: Notify Slack on Failure
uses: slackapi/slack-github-action@v1.25.0
if: failure()
with:
payload: |
{
"attachments": [
{
"color": "#E92020",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*GitHub Workflow Failure*\ngo-sdk/nightly-build\n*Workflow Run*\n https://github.com/lacework/go-sdk/actions/runs/${{ github.run_id }}\n@oncall-growth-eng! There has been a failure that needs your attention. :rotating_light:"
}
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GROWTH_ENG_ALERTS }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
Loading