diff --git a/.github/workflows/build-8.x-3.x.yml b/.github/workflows/build-8.x-3.x.yml new file mode 100644 index 0000000..cef56b9 --- /dev/null +++ b/.github/workflows/build-8.x-3.x.yml @@ -0,0 +1,116 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the 7.x branch + push: + branches: [ 8.x-3.x, travis_update ] + pull_request: + branches: [ 8.x-3.x, travis_update ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + strategy: + matrix: + php-versions: ["7.3", "7.4"] + drupal-version: ["8.9.11", "9.1.5"] + + + services: + mysql: + image: mysql:5.7 + env: + MYSQL_ALLOW_EMPTY_PASSWORD: yes + MYSQL_DATABASE: drupal + ports: + - 3306:3306 + activemq: + image: webcenter/activemq:5.14.3 + ports: + - 8161:8161 + - 61616:61616 + - 61613:61613 + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout code + uses: actions/checkout@v2 + with: + path: build_dir + + - name: Checkout islandora_ci + uses: actions/checkout@v2 + with: + repository: islandora/islandora_ci + ref: github-actions + path: islandora_ci + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + tools: composer:v2 + + - name: Setup Mysql client + run: | + sudo apt-get update + sudo apt-get install -y mysql-client + + - name: Set environment variables + run: | + echo "DRUPAL_VERSION=${{ matrix.drupal-version }}" >> $GITHUB_ENV + echo "SCRIPT_DIR=$GITHUB_WORKSPACE/islandora_ci" >> $GITHUB_ENV + echo "DRUPAL_DIR=/opt/drupal" >> $GITHUB_ENV + echo "PHPUNIT_FILE=$GITHUB_WORKSPACE/build_dir/phpunit.xml" >> $GITHUB_ENV + + - name: Cache Composer dependencies + uses: actions/cache@v2 + with: + path: /tmp/composer-cache + key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} + + - name: Setup Drupal + run: | + mkdir $DRUPAL_DIR + $SCRIPT_DIR/travis_setup_drupal.sh + cd $DRUPAL_DIR + chmod -R u+w web/sites/default + mkdir -p web/sites/simpletest/browser_output + + - name: Setup composer paths + run: | + git -C "$GITHUB_WORKSPACE/build_dir" checkout -b travis-testing + cd $DRUPAL_DIR + composer config repositories.local path "$GITHUB_WORKSPACE/build_dir" + composer config minimum-stability dev + composer require "islandora/islandora:dev-8.x-1.x" + composer require "islandora/carapace:dev-travis-testing as dev-8.x-3.x" --prefer-source --update-with-dependencies + + - name: Install modules + run: | + cd $DRUPAL_DIR/web + drush --uri=127.0.0.1:8282 en -y islandora_audio islandora_breadcrumbs islandora_iiif islandora_image islandora_video islandora_text_extraction_defaults + drush --uri=127.0.0.1:8282 fim -y islandora_core_feature,islandora_text_extraction_defaults + drush --uri=127.0.0.1:8282 then -y carapace + + - name: Test line ending scripts + run: | + $SCRIPT_DIR/line_endings.sh $GITHUB_WORKSPACE/build_dir + + - name: Test phpcs + run: | + phpcs --standard=Drupal --ignore=*.md,*-min.css,*.css --extensions=php,module,inc,install,test,profile,theme,css,info $GITHUB_WORKSPACE/build_dir + - name: Test phpcs custom.css + run: | + phpcs --standard=Drupal $GITHUB_WORKSPACE/build_dir/styles/css/custom.css + #TODO phpcpd - it wasn't working for whatever reason diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f01cab1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,46 +0,0 @@ -sudo: true -language: php -php: - - 7.2 - - 7.3 - -services: - - mysql - -matrix: - fast_finish: true - allow_failures: - - php: 7.3 - -branches: - only: - - /^8.x/ - -before_install: - - export SCRIPT_DIR=$HOME/islandora_ci - - export DRUPAL_DIR=/opt/drupal - - export COMPOSER_PATH="/home/travis/.phpenv/versions/$TRAVIS_PHP_VERSION/bin/composer" - -install: - - git clone https://github.com/Islandora/islandora_ci.git $HOME/islandora_ci - - $SCRIPT_DIR/travis_setup_drupal.sh - - git -C "$TRAVIS_BUILD_DIR" checkout -b travis-testing - - cd $DRUPAL_DIR - - chmod -R u+w web/sites/default - - COMPOSER_MEMORY_LIMIT=-1 php -d memory_limit=-1 $COMPOSER_PATH config repositories.local path "$TRAVIS_BUILD_DIR" - - COMPOSER_MEMORY_LIMIT=-1 php -d memory_limit=-1 $COMPOSER_PATH require "islandora/carapace:dev-travis-testing as dev-8.x-1.x" --prefer-source --update-with-dependencies - - cd web; drush --uri=127.0.0.1:8282 then -y carapace - -script: - - $SCRIPT_DIR/line_endings.sh $TRAVIS_BUILD_DIR - - phpcs --standard=Drupal --ignore='*.md,*-min.css,*.css' --extensions=php,module,inc,install,test,profile,theme,info $TRAVIS_BUILD_DIR - - phpcs --standard=Drupal $TRAVIS_BUILD_DIR/styles/css/custom.css - - phpcpd --names *.module,*.inc,*.test,*.php $TRAVIS_BUILD_DIR - -notifications: - irc: - channels: - - "irc.freenode.org#islandora" - on_success: change - on_failure: always - skip_join: true diff --git a/carapace.info.yml b/carapace.info.yml index da56330..ff3df3e 100644 --- a/carapace.info.yml +++ b/carapace.info.yml @@ -5,7 +5,7 @@ type: theme 'subtheme type': adaptive_subtheme layout: page-layout description: 'An AdaptiveTheme sub-theme customized to optimize the Islandora experience.
Base: at_core (8.x-3.1)' -core: 8.x +core_version_requirement: ^8 || ^9 regions: leaderboard: Leaderboard header_first: 'Header first' diff --git a/composer.json b/composer.json index c28bc0e..8fff696 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "drupal/adaptivetheme": "dev-3.x" + "drupal/at_theme": "^1.4" }, "require-dev": { "phpunit/phpunit": "^4.8",