Skip to content

Commit

Permalink
Fix ci issues (#38)
Browse files Browse the repository at this point in the history
* Removes aid check due to issue with bpf intro

* Updates runner to use ubuntu-20.04

* Add nightly job

* Ensure integration tests run when workflow file is modified
  • Loading branch information
carlosmmatos authored Jan 4, 2023
1 parent 1b0ee50 commit 3ba0afc
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 9 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,29 @@ on:
- 'resources/**'
- 'test/**'
- 'ohai/**'
- '.github/workflows/ci.yml'
pull_request_target:
types: [labeled]
paths:
- 'libraries/**'
- 'resources/**'
- 'test/**'
- 'ohai/**'
- '.github/workflows/ci.yml'
workflow_call:
secrets:
FALCON_CLIENT_ID:
description: 'Falcon API Client ID'
required: true
FALCON_CLIENT_SECRET:
description: 'Falcon API Client Secret'
required: true
FALCON_CID:
description: 'Falcon API CID'
required: true
FALCON_CLOUD:
description: 'Falcon API Cloud'
required: true

jobs:
integration:
Expand All @@ -21,7 +37,7 @@ jobs:
github.event_name == 'schedule' ||
(github.event_name == 'pull_request_target' &&
github.event.label.name == 'ok-to-test')
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
os:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: "Lint Tests"

on: [push, pull_request]
on:
push:
workflow_call:
pull_request:

jobs:
lint-unit:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "nightly"

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
lint-unit:
name: "Run chef lint tests"
uses: ./.github/workflows/lint-unit.yml

integration:
name: "Run chef integration tests"
uses: ./.github/workflows/integration.yml
secrets:
FALCON_CLIENT_ID: ${{ secrets.FALCON_CLIENT_ID }}
FALCON_CLIENT_SECRET: ${{ secrets.FALCON_CLIENT_SECRET }}
FALCON_CID: ${{ secrets.FALCON_CID }}
FALCON_CLOUD: ${{ secrets.FALCON_CLOUD }}
7 changes: 0 additions & 7 deletions test/integration/common/controls/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@
end
end

control 'config-aid' do
desc 'AID should be present'
describe command('/opt/CrowdStrike/falconctl -g --aid') do
its('stdout') { should match /aid=/ }
end
end

control 'config-cid' do
desc 'CID should be present'
describe command('/opt/CrowdStrike/falconctl -g --cid') do
Expand Down

0 comments on commit 3ba0afc

Please sign in to comment.