Last active
August 31, 2022 17:20
-
-
Save mik-laj/d01b82265783372204ea6f1a01593696 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# This is a basic workflow to help you get started with Actions | |
name: CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
schedule: | |
- cron: '30 1 * * 1' | |
workflow_dispatch: | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ANSWER: "yes" | |
VERBOSE: "true" | |
GITHUB_REPOSITORY: 'apache/airflow' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
repository: apache/airflow | |
- run: ./scripts/ci/install_breeze.sh | |
- run: breeze ci-image build --python 3.8 | |
- name: Set up credentials | |
env: | |
SNOWFLAKE_CONN: ${{ secrets.SNOWFLAKE_CONN }} | |
run: | | |
mkdir -p files/airflow-breeze-config; | |
( | |
echo "export AIRFLOW_CONN_MY_SNOWFLAKE_CONN=${SNOWFLAKE_CONN@Q}" | |
echo "export SYSTEM_TESTS_ENV_ID=${RANDOM@Q}" | |
) >> files/airflow-breeze-config/variables.env; | |
sed -i -s " | |
s/'role_name'/'ACCOUNTADMIN'/; | |
s/'warehouse_name'/'COMPUTE_WH'/; | |
s/'database_name'/'DEV_KBREGULA_DATASTUDIO'/; | |
s/'schema_name'/'PUBLIC'/ | |
" tests/system/providers/snowflake/example_snowflake.py | |
- run: breeze testing tests --test-type 'Providers[snowflake]' | |
- run: breeze testing tests -- tests/system/providers/snowflake --system snowflake | |
- name: "Upload airflow logs" | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: airflow-logs | |
path: "./files/airflow_logs*" | |
retention-days: 7 | |
- name: "Upload container logs" | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: containers-logs | |
path: "./files/container_logs*" | |
retention-days: 7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment