Skip to content

Commit

Permalink
May 23rd workflow experiment 1
Browse files Browse the repository at this point in the history
  • Loading branch information
ckunki committed May 23, 2024
1 parent ff1d2b1 commit 58e8c6b
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Continues Integration (Master)
name: Continuous Integration (Main)

on:
workflow_dispatch:
Expand All @@ -15,4 +15,4 @@ jobs:
uses: ./.github/workflows/ci.yml
secrets: inherit
with:
commit-message: ${{ github.event.head_commit.message }}
slow-tests: true
2 changes: 1 addition & 1 deletion .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Continues Integration (PR)
name: Continuous Integration (PR)

on:
pull_request:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/ci-slow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Continuous Integration (incl. Slow Tests)

on:
workflow_dispatch:

jobs:

ci-slow:
uses: ./.github/workflows/ci.yml
secrets: inherit
with:
slow-tests: true
57 changes: 35 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: CI

on:
workflow_call:
inputs:
slow-tests:
type: string
secrets:
ALTERNATIVE_GITHUB_TOKEN:
required: false
Expand All @@ -13,28 +16,38 @@ jobs:
runs-on: ubuntu-20.04

steps:
- name: SCM Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set pytest markers
id: pytest-markers
if: ${{ inputs.slow-tests }}
run: echo slow-tests='-m "not slow"' >> "$GITHUB_OUTPUT"

- name: Examine Git Log
id: git-log
- name: Examine Inputs
run: |
git log -2
if ! (git log -2 --format="%b" | grep "\[run-slow-tests\]"); then
echo SLOW_TESTS='-m "not slow"' >> "$GITHUB_OUTPUT"
fi
echo "input slow tests = ${{ inputs.slow-tests }}"
echo "pytest-markers = ${{ pytest-markers.outputs.slow-tests }}"
- name: Setup Development Environment
uses: ./.github/actions/pytest-plugins-environment

- name: Run Tests of All Plugins
run: |
echo "PYTEST_ADDOPTS = $PYTEST_ADDOPTS"
just test
env:
SAAS_HOST: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_HOST }}
SAAS_ACCOUNT_ID: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_ACCOUNT_ID }}
SAAS_PAT: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_PAT }}
PYTEST_ADDOPTS: '-o log_cli=true -o log_cli_level=INFO ${{ steps.git-log.outputs.SLOW_TESTS }}'
# - name: SCM Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
#
# - name: Examine Git Log
# id: git-log
# run: |
# git log -2
# if ! (git log -2 --format="%b" | grep "\[run-slow-tests\]"); then
# echo SLOW_TESTS='-m "not slow"' >> "$GITHUB_OUTPUT"
# fi
#
# - name: Setup Development Environment
# uses: ./.github/actions/pytest-plugins-environment
#
# - name: Run Tests of All Plugins
# run: |
# echo "PYTEST_ADDOPTS = $PYTEST_ADDOPTS"
# just test
# env:
# SAAS_HOST: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_HOST }}
# SAAS_ACCOUNT_ID: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_ACCOUNT_ID }}
# SAAS_PAT: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_PAT }}
# PYTEST_ADDOPTS: '-o log_cli=true -o log_cli_level=INFO ${{ steps.git-log.outputs.SLOW_TESTS }}'

0 comments on commit 58e8c6b

Please sign in to comment.