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

MISC: Github actions added, Travis setup removed. #86

Merged
merged 1 commit into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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>