[ENG-1368] add ability to add snippet to top of Python SDK README.md … #162
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: Konfig SDK Integration Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
check_for_relevant_changes: | |
runs-on: ubuntu-latest | |
outputs: | |
shouldRun: ${{ steps.check_changes.outputs.shouldRun }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Get changed files | |
id: get_changed_files | |
uses: Ana06/[email protected] | |
- name: Check for changes in specific paths | |
id: check_changes | |
run: | | |
for file in ${{ steps.get_changed_files.outputs.all }}; do | |
if [[ $file =~ ^generator/konfig-(integration-tests|dash|python-formatter-server-blackd|generator-api)/ && ! $file =~ \.md$ ]]; then | |
echo "shouldRun=true" >> "$GITHUB_OUTPUT" | |
exit 0 | |
fi | |
done | |
execute_integration_tests: | |
needs: check_for_relevant_changes | |
runs-on: ubuntu-latest | |
if: > | |
needs.check_for_relevant_changes.outputs.shouldRun == 'true' || | |
contains(github.event.head_commit.message, 'run-integration-tests') || | |
contains(github.event.head_commit.message, 'run-it') | |
strategy: | |
matrix: | |
config: | |
- shard: '1/2' | |
sat: 'med-boy' | |
- shard: '2/2' | |
sat: 'med-boy-friend-1' | |
env: | |
EARTHLY_SECRETS: ${{ secrets.EARTHLY_SECRETS }} | |
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }} | |
EARTHLY_ORG: konfig-publisher | |
steps: | |
- name: Setup Earthly | |
uses: earthly/actions-setup@v1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
version: "latest" | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Write .env file for earthly | |
run: | | |
echo "NPM_TOKEN=${{ secrets.NPM_TOKEN }}" >> ./compose/.env | |
echo "SESSION_SECRET=${{ secrets.SESSION_SECRET }}" >> ./compose/.env | |
echo "AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}" >> ./compose/.env | |
echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> ./compose/.env | |
working-directory: ./generator/konfig-integration-tests | |
- name: Build and run integration tests | |
run: earthly --ci --sat ${{ matrix.config.sat }} --secret NPM_TOKEN=dummy --secret GITHUB_ACTIONS -P +test --TEST_ARGS="--shard=${{ matrix.config.shard }}" | |
working-directory: ./generator/konfig-integration-tests |