Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move to Github actions #25

Merged
merged 32 commits into from
Apr 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
2889084
fix for phpcd in travis
elizoller Apr 6, 2021
05844d6
still futzing with travis
elizoller Apr 6, 2021
6789893
still futzing with travis
elizoller Apr 6, 2021
1888076
still futzing with travis
elizoller Apr 6, 2021
af27e1c
trying phpunit update in islandora_ci
elizoller Apr 6, 2021
f19b91a
first attempt at github workflows
elizoller Apr 19, 2021
69aeda1
dear github actions, please work
elizoller Apr 19, 2021
6ce5a64
attempt to get composer to install
elizoller Apr 19, 2021
0073c70
attempt to get composer to install
elizoller Apr 19, 2021
45a2295
taking the work from PR #24 to see if it'll allow d9 to work
elizoller Apr 19, 2021
fbc7e49
removing phpunit since we don't have that for carapace
elizoller Apr 19, 2021
06b770c
use custom phpcs targeting for carapace files specifically
elizoller Apr 19, 2021
4c1a680
fix filename
elizoller Apr 19, 2021
8548a22
separating tests so i can see which one is failing
elizoller Apr 19, 2021
1729cfa
add .theme file for phpcpd
elizoller Apr 19, 2021
113c9d0
i don't have any files for phpcpd?
elizoller Apr 19, 2021
ffeb747
please run phpcpd
elizoller Apr 19, 2021
1262cec
cd into the directory?
elizoller Apr 19, 2021
f95696e
is it name not suffix for phpcpd
elizoller Apr 19, 2021
0b52ce5
phpcpd still hates me
elizoller Apr 19, 2021
46ab2a9
debugging whats going on with phpcpd
elizoller Apr 19, 2021
f988027
debugging whats going on with phpcpd
elizoller Apr 19, 2021
c05ae9b
cleanup
elizoller Apr 19, 2021
aad7a5f
phpcpd still hates me
elizoller Apr 19, 2021
3f1007e
remove verbosity
elizoller Apr 19, 2021
b6a7e13
just run the theme file?
elizoller Apr 19, 2021
5cbf7c5
phpcpd anyone?
elizoller Apr 19, 2021
d07af33
still working on phpcpd
elizoller Apr 19, 2021
64460c6
trying more
elizoller Apr 19, 2021
66d51dc
special travis scripts file in ci
elizoller Apr 19, 2021
d19dbd3
TODO for phpcpd and remove travis
elizoller Apr 20, 2021
bc206c9
remove unused file
elizoller Apr 20, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions .github/workflows/build-8.x-3.x.yml
Original file line number Diff line number Diff line change
@@ -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
46 changes: 0 additions & 46 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion carapace.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ type: theme
'subtheme type': adaptive_subtheme
layout: page-layout
description: 'An AdaptiveTheme sub-theme customized to optimize the Islandora experience. <br>Base: at_core (8.x-3.1)'
core: 8.x
core_version_requirement: ^8 || ^9
regions:
leaderboard: Leaderboard
header_first: 'Header first'
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"drupal/adaptivetheme": "dev-3.x"
"drupal/at_theme": "^1.4"
},
"require-dev": {
"phpunit/phpunit": "^4.8",
Expand Down