testEndToEnd #391
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
name: testEndToEnd | |
on: | |
push: | |
pull_request: | |
types: [opened, reopened] | |
schedule: | |
- cron: "44 4 * * *" | |
jobs: | |
testEverything: | |
strategy: | |
fail-fast: false | |
matrix: | |
python_version: ["3.9", "3.10", "3.11"] | |
operating_system: ["ubuntu-20.04", "ubuntu-22.04"] | |
#operating_system: ["ubuntu-20.04", "ubuntu-22.04", "macos-latest"] | |
runs-on: ${{ matrix.operating_system }} | |
steps: | |
- name: Install Docker for macOS | |
run: | | |
brew install docker | |
#import magic fails on macos runner | |
brew install libmagic | |
colima start | |
# Mapping below is required to get the Python docker library working | |
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock | |
if: matrix.operating_system == 'macos-latest' | |
#Checkout the current branch | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
#Install the given version of Python we will test against | |
- name: Install Required Python Version | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python_version }} | |
architecture: "x64" | |
- name: Install Poetry | |
run: | |
python -m pip install poetry | |
- name: Install contentctl and activate the shell | |
run: | | |
poetry install --no-interaction | |
mkdir my_splunk_content_pack | |
- name: Run contentctl init | |
run: | | |
cd my_splunk_content_pack | |
poetry run contentctl init | |
- name: Run contentctl validate | |
run: | | |
cd my_splunk_content_pack | |
poetry run contentctl validate | |
- name: Run contentctl build | |
run: | | |
cd my_splunk_content_pack | |
poetry run contentctl build | |
#Do not pause on a failed detection | |
- name: Run contentctl test | |
run: | | |
cd my_splunk_content_pack | |
poetry run contentctl test --unattended | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: content_pack_${{ matrix.python_version }}_${{ matrix.operating_system }} | |
path: | | |
my_splunk_content_pack/dist/my_splunk_content_pack.tar.gz | |
my_splunk_content_pack/test_results/summary.yml | |