Sa 3606 update commands json ci #3
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: Commands Gallery CI | ||
on: | ||
pull_request: | ||
# Sequence of patterns matched against refs/heads | ||
branches: | ||
- "master" | ||
paths: | ||
- "PowerShell/JumpCloud Commands Gallery/**" | ||
- "PowerShell/JumpCloud Commands Gallery/commands.json" | ||
types: [opened, synchronize, reopened, labeled, unlabeled] | ||
jobs: | ||
Filter-Branch: | ||
runs-on: ubuntu-latest | ||
if: contains(github.event.pull_request.labels.*.name, 'Commands Gallery') | ||
steps: | ||
- run: echo "Building JumpCloud Commands Gallery Event" | ||
# Check-PR-Labels: | ||
# needs: ["Filter-Branch"] | ||
# runs-on: ubuntu-latest | ||
# outputs: | ||
# RELEASE_TYPE: ${{ steps.validate.outputs.RELEASE_TYPE }} | ||
# steps: | ||
# - name: Validate-PR-Version-Labels | ||
# id: validate | ||
# shell: pwsh | ||
# run: | | ||
# $PR_LABEL_LIST=$(curl -s "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels" | jq -r '.[].name') | ||
# if ("Commands Gallery" -in $PR_LABEL_LIST) { | ||
# write-host "Starting Build for Commands Gallery" | ||
# } | ||
# else { | ||
# write-host "No Commands Gallery label found, skipping build" | ||
# exit 1 | ||
# } | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
Test-Commands-Gallery: | ||
needs: ["Check-PR-Labels", "Filter-Branch"] | ||
Check failure on line 39 in .github/workflows/commands-gallery-ci.yml GitHub Actions / Commands Gallery CIInvalid workflow file
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
- name: Install dependencies | ||
run: python -m pip install ./scripts | ||
pip install -r .github/scripts/requirements.txt | ||
- name: Run Python Test | ||
run: pytest .github/scripts/tests/test_build_commands_gallery.py |