Skip to content

Commit

Permalink
Merge pull request #86 from silverstripe/feature/github-actions
Browse files Browse the repository at this point in the history
MISC: Github actions added, Travis setup removed.
  • Loading branch information
mfendeksilverstripe authored Nov 29, 2022
2 parents d2a876e + daa12f3 commit e1062af
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 33 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: CI

on:
push:
pull_request:
workflow_dispatch:

jobs:
ci:
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions client/src/components/HistoryViewer/HistoryViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,14 @@ class HistoryViewer extends Component {
// Currently previewMode === MODE_VERSION is disabled as it displays incorrect relations.

schemaVersionReplacements[':date'] = currentVersion.lastEdited;

const schemaCompareReplacements = {
':id': recordId,
':class': recordClass,
':from': versionFrom.version || 0,
':to': versionTo.version || 0,
};

const schemaSearch = compare ? /:id|:class|:from|:to/g : /:id|:class|:version|:date/g;
const schemaReplacements = compare ? schemaCompareReplacements : schemaVersionReplacements;

Expand Down
2 changes: 2 additions & 0 deletions client/src/legacy/VersionedEditForm/VersionedEditForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jQuery.entwine('ss', ($) => {
'Are you sure you want to remove your record from the published site?\n\nThis record will still be available in the CMS as draft.'
);

// eslint-disable-next-line no-alert
if (confirm(message)) {
// Add a loading indicator and continue
this.parents('form:first').addClass('loading');
Expand Down Expand Up @@ -49,6 +50,7 @@ jQuery.entwine('ss', ($) => {
'Warning: This record will be unpublished before being sent to the archive.\n\nAre you sure you want to proceed?'
);

// eslint-disable-next-line no-alert
if (confirm(message)) {
// Add a loading indicator and continue
this.parents('form:first').addClass('loading');
Expand Down
11 changes: 4 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,13 @@
}
],
"require": {
"silverstripe/framework": "^4",
"silverstripe/graphql": "^4 | >= 3.5.1",
"silverstripe/versioned-snapshots": "1.x-dev",
"silverstripe/versioned-admin": "^1",
"silverstripe/admin": "^1.7",
"silverstripe/vendor-plugin": "^1"
"silverstripe/versioned-snapshots": "^1",
"silverstripe/versioned-admin": "^1.7",
"silverstripe/vendor-plugin": "^1.6"
},
"require-dev": {
"silverstripe/versioned": "^1",
"silverstripe/recipe-testing": "^1 || ^2"
"silverstripe/recipe-testing": "^2"
},
"autoload": {
"psr-4": {
Expand Down
30 changes: 15 additions & 15 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<!--
Standard module phpunit configuration.
Requires PHPUnit ^5.7
-->
<phpunit bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true">
<testsuite name="Default">
<directory>tests/</directory>
</testsuite>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<?xml version="1.0"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/silverstripe/cms/tests/bootstrap.php"
colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage includeUncoveredFiles="true">
<include>
<directory suffix=".php">src/</directory>
<exclude>
<directory suffix=".php">tests/</directory>
</exclude>
</whitelist>
</filter>
</include>
<exclude>
<directory suffix=".php">tests/</directory>
</exclude>
</coverage>
<testsuites>
<testsuite name="Default">
<directory>tests/</directory>
</testsuite>
</testsuites>
</phpunit>

0 comments on commit e1062af

Please sign in to comment.