This repository has been archived by the owner on Apr 3, 2024. It is now read-only.
forked from apache/airflow
-
Notifications
You must be signed in to change notification settings - Fork 28
107 lines (104 loc) · 3.94 KB
/
scheduled_quarantined.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
---
name: Quarantined Build
on: # yamllint disable-line rule:truthy
schedule:
# Run quarantined builds 4 times a day to gather better quarantine stats
- cron: '12 */6 * * *'
env:
MOUNT_SELECTED_LOCAL_SOURCES: "false"
FORCE_ANSWER_TO_QUESTIONS: "yes"
FORCE_PULL_IMAGES: "false"
CHECK_IMAGE_FOR_REBUILD: "true"
SKIP_CHECK_REMOTE_IMAGE: "true"
DB_RESET: "true"
VERBOSE: "true"
UPGRADE_TO_NEWER_DEPENDENCIES: false
PYTHON_MAJOR_MINOR_VERSION: 3.6
USE_GITHUB_REGISTRY: "true"
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_USERNAME: ${{ github.actor }}
# This token is WRITE one - schedule type of events always have the WRITE token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# This token should not be empty in schedule type of event.
CONTAINER_REGISTRY_TOKEN: ${{ secrets.PAT_CR }}
# Since we run this build on schedule, it might be that the image has never been pushed
# Because the master merge was cancelled, so we have to rebuild the image for quarantined build
GITHUB_REGISTRY_PULL_IMAGE_TAG: "latest"
GITHUB_REGISTRY_PUSH_IMAGE_TAG: "latest"
GITHUB_REGISTRY_WAIT_FOR_IMAGE: "false"
GITHUB_REGISTRY: ${{ secrets.OVERRIDE_GITHUB_REGISTRY }}
jobs:
tests-quarantined:
timeout-minutes: 80
name: "Quarantined tests"
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.6]
postgres-version: [9.6]
env:
BACKEND: postgres
PYTHON_MAJOR_MINOR_VERSION: ${{ matrix.python-version }}
POSTGRES_VERSION: ${{ matrix.postgres-version }}
RUN_TESTS: "true"
FORCE_TEST_TYPE: Quarantined
NUM_RUNS: 20
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: "Set issue id for master"
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
run: |
echo "ISSUE_ID=10118" >> $GITHUB_ENV
- name: "Set issue id for v1-10-stable"
if: github.ref == 'refs/heads/v1-10-stable'
run: |
echo "ISSUE_ID=10127" >> $GITHUB_ENV
- name: "Set issue id for v1-10-test"
if: github.ref == 'refs/heads/v1-10-test'
run: |
echo "ISSUE_ID=10128" >> $GITHUB_ENV
- name: "Free space"
run: ./scripts/ci/tools/ci_free_space_on_ci.sh
- name: "Build CI image ${{ matrix.python-version }}"
run: ./scripts/ci/images/ci_prepare_ci_image_on_ci.sh
env:
GITHUB_REGISTRY: ${{ steps.determine-github-registry.outputs.githubRegistry }}
- name: "Tests"
run: ./scripts/ci/testing/ci_run_airflow_testing.sh
- uses: actions/upload-artifact@v2
name: Upload Quarantine test results
if: always()
with:
name: 'quarantined_tests'
path: 'files/test_result-*.xml'
retention-days: 7
- uses: actions/upload-artifact@v2
name: Upload airflow logs
if: always()
with:
name: airflow-logs-quarantined-${{matrix.python-version}}-${{ matrix.postgres-version }}
path: './files/airflow_logs*'
retention-days: 7