-
Notifications
You must be signed in to change notification settings - Fork 21
149 lines (136 loc) · 5.48 KB
/
orca.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
---
name: ORCA CI
on:
push:
branches: [ main, develop, wip, support/**, release/**, hotfix/** ]
paths-ignore:
- .idea/**
- docs/**
pull_request:
branches: [ develop ]
paths-ignore:
- .idea/**
- docs/**
schedule:
# Daily at 00:00:00 UTC.
# @see https://crontab.cronhub.io/
- cron: "0 0 * * *"
jobs:
build:
runs-on: ubuntu-latest
env:
# Boolean values must be quoted, otherwise they will be converted to lower case and break ORCA scripts.
ORCA_SUT_NAME: drupal/example
ORCA_SUT_BRANCH: main
ORCA_PACKAGES_CONFIG: example/tests/packages.yml
ORCA_PACKAGES_CONFIG_ALTER: example/tests/packages_alter.yml
# Hardcode path since GITHUB_WORKSPACE can't be used here.
# @see https://github.community/t/how-to-use-env-context/16975/9
ORCA_SUT_DIR: /home/runner/work/orca/example
ORCA_SELF_TEST_COVERAGE_CLOVER: /home/runner/build/logs/clover.xml
ORCA_JOB: ${{ matrix.orca-job }}
ORCA_ENABLE_NIGHTWATCH: ${{ matrix.orca-enable-nightwatch }}
ORCA_COVERAGE_ENABLE: ${{ matrix.orca-coverage-enable }}
# Google env variables.
ORCA_GOOGLE_API_CLIENT_ID: ${{ secrets.ORCA_GOOGLE_API_CLIENT_ID }}
ORCA_GOOGLE_API_CLIENT_SECRET: ${{ secrets.ORCA_GOOGLE_API_CLIENT_SECRET }}
ORCA_GOOGLE_API_REFRESH_TOKEN: ${{ secrets.ORCA_GOOGLE_API_REFRESH_TOKEN }}
strategy:
matrix:
orca-job:
- STATIC_CODE_ANALYSIS
# - INTEGRATED_TEST_ON_OLDEST_SUPPORTED
# - INTEGRATED_TEST_ON_PREVIOUS_MINOR
# - INTEGRATED_TEST_ON_LATEST_LTS
# # - INTEGRATED_UPGRADE_TEST_FROM_PREVIOUS_MINOR
# - INTEGRATED_TEST_ON_CURRENT
# # - INTEGRATED_UPGRADE_TEST_TO_NEXT_MINOR
# - ISOLATED_TEST_ON_CURRENT_DEV
# - INTEGRATED_TEST_ON_CURRENT_DEV
# - STRICT_DEPRECATED_CODE_SCAN
# - ISOLATED_TEST_ON_NEXT_MINOR
# - INTEGRATED_TEST_ON_NEXT_MINOR
# # - ISOLATED_UPGRADE_TEST_TO_NEXT_MAJOR_BETA_OR_LATER
# # - ISOLATED_UPGRADE_TEST_TO_NEXT_MAJOR_DEV
# - DEPRECATED_CODE_SCAN_W_CONTRIB
# - INTEGRATED_TEST_ON_NEXT_MINOR_DEV
# - ISOLATED_TEST_ON_NEXT_MINOR_DEV
# # - INTEGRATED_UPGRADE_TEST_TO_NEXT_MINOR_DEV
# - LOOSE_DEPRECATED_CODE_SCAN
# - INTEGRATED_TEST_ON_NEXT_MAJOR_LATEST_MINOR_BETA_OR_LATER
# - ISOLATED_TEST_ON_NEXT_MAJOR_LATEST_MINOR_DEV
# - INTEGRATED_TEST_ON_NEXT_MAJOR_LATEST_MINOR_DEV
php-version: [ "8.1" ]
orca-enable-nightwatch: [ "FALSE" ]
orca-coverage-enable: [ "FALSE" ]
include:
# Testing Drupal 10 in php 8.1 with nightwatch and coverage.
- orca-job: ISOLATED_TEST_ON_CURRENT
php-version: "8.1"
orca-enable-nightwatch: "TRUE"
orca-coverage-enable: "TRUE"
# # Testing Drupal 10 in php 8.2.
# - orca-job: ISOLATED_TEST_ON_CURRENT
# php-version: "8.2"
#
# # Testing latest Drupal 9 in php 8.2.
# - orca-job: INTEGRATED_TEST_ON_LATEST_LTS
# php-version: "8.2"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20.x
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
- name: Install google-chrome-stable
run: |
CHROME_VERSION_STRING="114.0.5735.198-1"
CHROME_DRIVER_VERSION_STRING="114.0.5735.90"
wget "https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION_STRING}_amd64.deb"
sudo dpkg -i "google-chrome-stable_${CHROME_VERSION_STRING}_amd64.deb"
# Download driver
wget -N https://chromedriver.storage.googleapis.com/${CHROME_DRIVER_VERSION_STRING}/chromedriver_linux64.zip -P ~/
unzip ~/chromedriver_linux64.zip -d ~/
rm ~/chromedriver_linux64.zip
mv -f ~/chromedriver /usr/local/share/
chmod +x /usr/local/share/chromedriver
ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
- name: Before install
run: |
../orca/bin/ci/self-test/before_install.sh
../orca/bin/ci/before_install.sh
- name: Install
run: |
../orca/bin/ci/self-test/install.sh
../orca/bin/ci/install.sh
- name: Before script
run: ../orca/bin/ci/before_script.sh
- name: Script
run: |
../orca/bin/ci/self-test/script.sh
unset ORCA_ENABLE_NIGHTWATCH
../orca/bin/ci/script.sh
# These two jobs need to run regardless of success or failure in ORCA's self-tests in order to exercise the code.
- name: After script
run: |
../orca/bin/ci/self-test/after_success.sh
unset ORCA_COVERAGE_ENABLE
../orca/bin/ci/after_success.sh
../orca/bin/ci/after_failure.sh
../orca/bin/ci/after_script.sh
# Require all checks to pass without having to enumerate them in the branch protection UI.
# @see https://github.community/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957
all-successful:
if: always()
runs-on: ubuntu-latest
needs: [ build ]
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
- name: All checks successful
run: echo "🎉"