Skip to content

tests

tests #925

Workflow file for this run

---
name: tests
on:
push:
branches: [ main, develop, wip ]
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-24.04
env:
ORCA_SUT_NAME: acquia/drupal-spec-tool
ORCA_SUT_BRANCH: master
ORCA_VERSION: ${{ matrix.orca-version }}
ORCA_JOB: ${{ matrix.orca-job }}
BEHAT: ${{ matrix.behat }}
# 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
- ISOLATED_TEST_ON_CURRENT
# - INTEGRATED_TEST_ON_OLDEST_SUPPORTED # Integrated test on oldest supported Drupal core version.
# - INTEGRATED_TEST_ON_LATEST_LTS # Integrated test on latest LTS Drupal core version.
# - INTEGRATED_TEST_ON_PREVIOUS_MINOR # Integrated test on previous minor Drupal core version.
# - INTEGRATED_UPGRADE_TEST_FROM_PREVIOUS_MINOR # Integrated upgrade test from previous minor.
# - ISOLATED_TEST_ON_CURRENT # Isolated test on current Drupal core version.
# This job customized below under "include".
# - INTEGRATED_TEST_ON_CURRENT # Integrated test on current Drupal core version.
# - ISOLATED_TEST_ON_CURRENT_DEV # Isolated test on current dev Drupal core version.
# - INTEGRATED_TEST_ON_CURRENT_DEV # Integrated test on current dev Drupal core version.
# - LOOSE_DEPRECATED_CODE_SCAN # Loose deprecated code scan.
# - STRICT_DEPRECATED_CODE_SCAN # Strict deprecated code scan.
# - DEPRECATED_CODE_SCAN_W_CONTRIB # Deprecated code scan w/ contrib.
# - ISOLATED_TEST_ON_NEXT_MINOR # Isolated test on next minor Drupal core version.
# - INTEGRATED_TEST_ON_NEXT_MINOR # Integrated test on next minor Drupal core version.
# - ISOLATED_TEST_ON_NEXT_MINOR_DEV # Isolated test on next minor dev Drupal core version.
# - INTEGRATED_TEST_ON_NEXT_MINOR_DEV # Integrated test on next minor dev Drupal core version.
# - LOOSE_DEPRECATED_CODE_SCAN
# Upgrade tests are not yet implemented.
# - INTEGRATED_UPGRADE_TEST_TO_NEXT_MINOR # Integrated upgrade test to next minor Drupal core version.
# - INTEGRATED_UPGRADE_TEST_TO_NEXT_MINOR_DEV # Integrated upgrade test to next minor dev Drupal core version.
# - INTEGRATED_UPGRADE_TEST_TO_NEXT_MINOR_DEV
# - ISOLATED_UPGRADE_TEST_TO_NEXT_MAJOR_BETA_OR_LATER # Isolated upgrade test to next major beta-or-later Drupal core version.
# - ISOLATED_UPGRADE_TEST_TO_NEXT_MAJOR_DEV # Isolated upgrade test to next major dev Drupal core version.
php-version: [ "8.3" ]
orca-version: [ "^4" ]
include:
# Acquia CMS/Spreadsheet/Behat integration test.
# - orca-job: "INTEGRATED_TEST_ON_CURRENT"
# php-version: "8.1"
# behat: "TRUE"
# This version of the Drupal Spec Tool only supports ^10.0.0-alpha1.
# - orca-job: INTEGRATED_TEST_ON_LATEST_EOL_MAJOR
# php-version: "8.1"
# - orca-job: ISOLATED_TEST_ON_NEXT_MAJOR_LATEST_MINOR_BETA_OR_LATER
# php-version: "8.3"
# - orca-job: INTEGRATED_TEST_ON_NEXT_MAJOR_LATEST_MINOR_BETA_OR_LATER
# php-version: "8.3"
# - orca-job: ISOLATED_TEST_ON_NEXT_MAJOR_LATEST_MINOR_DEV
# php-version: "8.3"
# - orca-job: INTEGRATED_TEST_ON_NEXT_MAJOR_LATEST_MINOR_DEV
# php-version: "8.3"
- orca-job: INTEGRATED_TEST_ON_OLDEST_SUPPORTED
php-version: "8.1"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12.x
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
# Install ORCA and prepare the environment.
- name: Before install
run: |
composer create-project --no-dev acquia/orca ../orca "$ORCA_VERSION"
../orca/bin/ci/before_install.sh
# Create the test fixture and place the SUT.
- name: Install
run: ../orca/bin/ci/install.sh
# Display details about the fixture.
- name: Before script
run: ../orca/bin/ci/before_script.sh
# Run the test script.
- name: Script
run: ./bin/ci/script.sh
# Perform final, post-script tasks.
- name: After script
run: ../orca/bin/ci/after_script.sh
# Conditionally send code coverage data to Coveralls.
- name: After success
if: ${{ success() }}
run: ../orca/bin/ci/after_success.sh
# Display debugging information in case of failure.
- name: After failure
if: ${{ failure() }}
run: ../orca/bin/ci/after_failure.sh
all-successful:
runs-on: ubuntu-latest
needs: [ build ]
steps:
- name: All checks successful
run: echo "🎉"