add a new render.yaml file for only docs #2287
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: ubicloud | |
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: ubicloud | |
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') | |
env: | |
EARTHLY_SECRETS: ${{ secrets.EARTHLY_SECRETS }} | |
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }} | |
EARTHLY_ORG: konfig-publisher | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
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: Set Earthly environment variable for debugging | |
run: export EARTHLY_DISABLE_REMOTE_REGISTRY_PROXY=1 | |
- name: Build and run integration tests | |
run: earthly --auto-skip --ci --sat larj-boy --secret AWS_ACCESS_KEY_ID --secret AWS_SECRET_ACCESS_KEY --secret NPM_TOKEN=dummy --secret GITHUB_ACTIONS -P +test | |
working-directory: ./generator/konfig-integration-tests |