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

Release: v1.16.0 #270

Merged
merged 64 commits into from
Jun 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
98ac843
feat: show blog summaries by default
ryon May 11, 2021
0c4811d
feat: add isEmpty method to cms composers
ryon May 11, 2021
afc1787
feat: add emptyText to markdown cms composer
ryon May 11, 2021
337243f
feat: make summary field built-in and toggleable
ryon May 11, 2021
81e5a27
feat: discourage empty posts in ui
ryon May 11, 2021
3c10099
feat: use system font stack in skeleton
ryon May 11, 2021
72c707b
feat: include logo placeholder in skeleton
ryon May 11, 2021
c399e49
chore(e2e): upgrade cypress
themightychris Apr 17, 2021
92d6052
feat(e2e): enable loginAs custom password
themightychris Apr 18, 2021
9ff1afa
docs: add steps for remote e2e testing
themightychris Apr 18, 2021
f315f8e
fix(e2e): don't relay on autofocus
themightychris Apr 18, 2021
f77ace3
refactor(e2e): split up register tests
themightychris Apr 18, 2021
0691dc9
fix: refactor register form and fix autofocus
themightychris May 25, 2021
7f2a596
fix: remove references to removed emergence-cms-summaries plugin
themightychris May 25, 2021
aa5d4a4
Merge pull request #269 from JarvusInnovations/features/e2e-testing
themightychris May 25, 2021
cd2f9cf
Merge pull request #268 from JarvusInnovations/features/improve-cms-p…
themightychris May 25, 2021
e82c615
chore(e2e): upgrade cypress to 7.4.0
themightychris May 25, 2021
1866c89
chore(ci): update release workflows
themightychris May 25, 2021
16697b8
feat(ci): add cypress/e2e test workflow
themightychris May 25, 2021
e6e6522
Merge pull request #271 from JarvusInnovations/features/github-e2e-wo…
themightychris May 27, 2021
dd8bb8a
fix(ci): create release on target branch
themightychris Jun 1, 2021
f43ec76
style: de-lint cypress code
themightychris Jun 10, 2021
401e227
fix(e2e): update cypress.json to match default studio name
themightychris Jun 10, 2021
52914d3
chore(e2e): upgrade cypress to 7.5.0
themightychris Jun 10, 2021
0b10160
fix(e2e): update loadDatabase command for new fixtures system
themightychris Jun 10, 2021
35554c1
feat(e2e): add blog post create test
themightychris Jun 10, 2021
8df2173
fix(cms): use itemIds to select components within toolbar
themightychris Jun 10, 2021
ecfe374
fix(cms): use correct format for time preview
themightychris Jun 10, 2021
b8ae8e9
feat(e2e): configure cypress-workspace holobranch
themightychris Jun 11, 2021
69a4a91
feat(e2e): add script/test command
themightychris Jun 11, 2021
be9a40c
feat(e2e): add script/test-interactive command
themightychris Jun 11, 2021
e08ca49
test(blog): verify post preview time/tags
themightychris Jun 11, 2021
7de0d02
feat(e2e): add mac compat with unionfs-fuse
themightychris Jun 12, 2021
bfa0b4d
test(blog): add failing edit test
themightychris Jun 12, 2021
b481cc6
fix(ci): update test-e2e workflow to use cypress-workspace projection
themightychris Jun 12, 2021
86d7138
fix(ci): enable holo caching to/from origin in test-e2e
themightychris Jun 12, 2021
c113e88
fix(ci): install core/hab-backline in CI studio
themightychris Jun 12, 2021
86ffd91
fix(ci): install emergence/studio in CI studio
themightychris Jun 12, 2021
fac00e3
fix(e2e): only run umount when needed, and don't run rm if it fails
themightychris Jun 14, 2021
8658f9d
fix(e2e): clean up cypress workspace with exit trap
themightychris Jun 14, 2021
4fab412
fix(blog): use cloned date values to set time/date fields
themightychris Jun 15, 2021
facca11
style(e2e): match command output to script name
themightychris Jun 14, 2021
c193e1c
feat(e2e): check for unionfs and print instructions
themightychris Jun 14, 2021
e1da91e
fix(e2e): remove unused options in unionfs mount
themightychris Jun 15, 2021
6c2b43e
chore(e2e): document unionfs vs overlayfs selection reasons
themightychris Jun 15, 2021
236dac1
feat(e2e): use cypress-native load-fixtures implementation
themightychris Jun 15, 2021
a20ec52
fix(e2e): point git dir/worktree back to original repo in cypress env
themightychris Jun 15, 2021
4543156
fix(e2e): explicitely connect to default database
themightychris Jun 15, 2021
e20c0a4
fix(e2e): configure mysql client
themightychris Jun 15, 2021
88a8b7b
fix(e2e): wait for mysql port in CI workflow
themightychris Jun 16, 2021
419163c
fix(e2e): remove unused backline and studio pkg deps
themightychris Jun 16, 2021
81d674a
fix(e2e): install required packages directly
themightychris Jun 16, 2021
fc3cc7e
fix(e2e): set permissions on fpm-exec
themightychris Jun 16, 2021
836b047
fix(ci): tweak job title
themightychris Jun 17, 2021
911a162
chore(e2e): remove explicit service pkg installs
themightychris Jun 20, 2021
8905152
fix: wait for mysql AND runtime
themightychris Jun 20, 2021
fcb5f1a
fix: reduce use of sudo
themightychris Jun 20, 2021
2b2a452
style: use separate waits
themightychris Jun 20, 2021
4fb65c4
fix: restore using sudo to test for php config
themightychris Jun 20, 2021
cca5536
fix: remove old php-runtime wait
themightychris Jun 20, 2021
b1135c1
style: update mysql CLI config step label
themightychris Jun 20, 2021
b1d0eb4
fix: enable executing fpm-exec
themightychris Jun 20, 2021
d1b7612
style: rename workflow to match filename
themightychris Jun 21, 2021
b64ea03
Merge pull request #272 from JarvusInnovations/fixes/blog-editor-fields
themightychris Jun 21, 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
19 changes: 6 additions & 13 deletions .github/workflows/release-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,15 @@ on:
branches: ['releases/v*']
types: [closed]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
release-deploy:

if: github.event.pull_request.merged == true # only run on PR merge
runs-on: ubuntu-latest
steps:

- name: Grab PR Title
- name: Configure release
run: |
set -e

PR_TITLE=$(jq -r ".pull_request.title" $GITHUB_EVENT_PATH)
PR_BODY=$(jq -r ".pull_request.body" $GITHUB_EVENT_PATH)
RELEASE_TAG=$(echo "${PR_TITLE}" | grep -oP "(?<=^Release: )v\d+\.\d+\.\d+(-rc\.\d+)?$")
Expand All @@ -37,14 +32,12 @@ jobs:
echo "${PR_BODY}" >> $GITHUB_ENV
echo 'END_OF_PR_BODY' >> $GITHUB_ENV

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create release
uses: ncipollo/release-action@v1
with:
tag_name: '${{ env.RELEASE_TAG }}'
release_name: '${{ env.RELEASE_TAG }}'
token: ${{ secrets.GITHUB_TOKEN }}
commit: '${{ github.sha }}'
tag: '${{ env.RELEASE_TAG }}'
body: '${{ env.PR_BODY }}'
draft: false
prerelease: ${{ env.RELEASE_PRERELEASE }}
6 changes: 2 additions & 4 deletions .github/workflows/release-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Grab PR Title
- name: Validate PR title
run: |
set -e

PR_TITLE=$(jq -r ".pull_request.title" $GITHUB_EVENT_PATH)

# check title format and extract tag
Expand All @@ -30,7 +28,7 @@ jobs:
fi

# check that tag doesn't exist
if git ls-remote --exit-code origin "refs/tags/${RELEASE_TAG}"; then
if git ls-remote --exit-code "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}" "refs/tags/${RELEASE_TAG}"; then
echo "The PR title's version exists already"
exit 1
fi
111 changes: 111 additions & 0 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: 'Test: End-to-end'

on: pull_request

env:
HAB_LICENSE: accept-no-persist
HOLO_CACHE_TO: origin
HOLO_CACHE_FROM: origin

jobs:
test-e2e:

runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2

# TODO: wrap the next three steps an an emergence-studio action
- name: 'Stop default mysql service'
run: sudo service mysql stop

- name: 'Initialize Chef Habitat environment'
uses: JarvusInnovations/habitat-action@action/v1
env:
HAB_NGINX: |
[http.listen]
port = 7080
HAB_MYSQL: |
app_username = 'appadmin'
app_password = 'appadmin'
bind = '0.0.0.0'
HAB_PHP_RUNTIME: |
[sites.default.holo]
gitDir = '${{ github.workspace }}/.git'
with:
deps: |
jarvus/hologit
supervisor: |
core/mysql
emergence/php-runtime --bind="database:mysql.default"
emergence/nginx --bind="backend:php-runtime.default"

- name: Waiting for MySQL
run: |
until nc -z localhost 3306; do
sleep 0.5
echo -n "."
done

- name: Waiting for Emergence runtime
run: |
until nc -z localhost 9123; do
sleep 0.5
echo -n "."
done

- name: Configure command-line client access
run: |
sudo chmod ugo+xr \
/hab/svc/mysql/config \
/hab/svc/mysql/config/client.cnf \
/hab/svc/php-runtime/config \
/hab/svc/php-runtime/config/fpm-exec

ln -sf /hab/svc/mysql/config/client.cnf ~/.my.cnf

- name: Load site projection into emergence runtime
env:
HOLO_CACHE_FROM: origin
HOLO_CACHE_TO: origin
run: |
SITE_TREE="$(hab pkg exec jarvus/hologit git-holo project emergence-site)"
[ -n "${SITE_TREE}" ] || exit 1
hab pkg exec emergence/php-runtime emergence-php-load "${SITE_TREE}"

- name: Set up Cypress workspace
run: |
CYPRESS_TREE="$(hab pkg exec jarvus/hologit git-holo project cypress-workspace)"
[ -n "${CYPRESS_TREE}" ] || exit 1
mkdir "${GITHUB_WORKSPACE}.cypress-workspace"
git archive --format=tar "${CYPRESS_TREE}" | (cd "${GITHUB_WORKSPACE}.cypress-workspace" && tar xf -)

- name: Run Cypress tests
uses: cypress-io/github-action@v2
env:
GIT_DIR: ${{ github.workspace }}/.git
GIT_WORK_TREE: ${{ github.workspace }}
with:
env: STUDIO_CONTAINER=,STUDIO_SSH=
working-directory: ${{ github.workspace }}.cypress-workspace

- name: Upload supervisor log
uses: actions/upload-artifact@v1
if: always()
with:
name: supervisor-log
path: /hab/sup/default/sup.log

- name: Upload Cypress screenshots
uses: actions/upload-artifact@v1
if: failure()
with:
name: cypress-screenshots
path: ${{ github.workspace }}.cypress-workspace/cypress/screenshots

- name: Upload Cypress videos
uses: actions/upload-artifact@v1
if: always()
with:
name: cypress-videos
path: ${{ github.workspace }}.cypress-workspace/cypress/videos
7 changes: 7 additions & 0 deletions .holo/branches/cypress-workspace/_skeleton-v1.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[holomapping]
files = [
"cypress/**",
"cypress.json",
"package.json",
"package-lock.json",
]
1 change: 0 additions & 1 deletion .holo/lenses/emergence-cms-editor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ files = [
"EmergenceContentEditor/**",
"packages/emr-skeleton-theme/**",
"packages/emergence-cms/**",
"packages/emergence-cms-summaries/**",
"packages/emergence-apikit/**",
"packages/jarvus-apikit/**",
"packages/jarvus-fileupload/**",
Expand Down
2 changes: 1 addition & 1 deletion cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"baseUrl": "http://localhost:7080",
"env": {
"STUDIO_SSH": null,
"STUDIO_CONTAINER": "emergence-studio"
"STUDIO_CONTAINER": "skeleton-studio"
},
"viewportWidth": 1200,
"viewportHeight": 660
Expand Down
110 changes: 110 additions & 0 deletions cypress/integration/blog.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
describe('Blogging', () => {

// reset database before tests
before(() => {
cy.resetDatabase();
});

it('Create post', () => {
cy.loginAs('user', 'user');

cy.visit('/blog');

cy.contains('Create a Post').click();

cy.get('.x-panel.emergence-cms-editor .x-btn[id^=emergence-cms-toolbar-][id$=-menu-trigger]')
.click();

cy.contains('.x-menu-item-text[id^=menuitem-]', 'Publish on save')
.click();

cy.contains('.x-menu-item-text[id^=menucheckitem-]', 'Publish on save')
.click();

cy.get('input[id^=datefield-]')
.type('{selectall}01/02/2030');

cy.get('input[id^=timefield-]')
.type('{selectall}4:05 pm{enter}');

cy.get('.x-component.emergence-cms-preview time[data-ref="timeEl"]')
.should('contain', 'Wednesday, January 2, 2030 at 4:05 pm')
.click();

cy.get('.x-panel.emergence-cms-editor .x-btn[id^=emergence-cms-toolbar-][id$=-menu-trigger]')
.click();

cy.contains('.x-menu-item-text[id^=menuitem-]', '1/2/2030 4:05 pm');

cy.get('.x-field.field-title input')
.type('Hello world!')
.tab();

cy.focused()
.should('contain', 'Save')
.tab();

cy.focused()
.wait(500)
.type('tag1{enter}tag2');

cy.get('.x-panel-body .x-field textarea')
.type('## Header 2{enter}{enter}### Header 3{enter}{enter}- point 1{enter}- point2{enter}');

cy.contains('.x-btn.save-btn', 'Save')
.click();

cy.location('pathname').should('eq', '/blog/hello_world/edit');
cy.location('search').should('be.empty');

cy.get('.x-component.emergence-cms-preview').within(() => {

cy.get('time[data-ref="timeEl"]')
.should('contain', 'Wednesday, January 2, 2030 at 4:05 pm');

cy.get('[data-ref=tagsCt] a')
.should('have.length', 2)
.first()
.should('have.attr', 'href', '/tags/tag1')
.should('have.text', 'tag1')
.next()
.should('have.attr', 'href', '/tags/tag2')
.should('have.text', 'tag2');
});
});

it('Edit post', () => {
cy.loginAs('user', 'user');

cy.visit('/drafts');

cy.contains('Hello world!')
.should('have.attr', 'href', '/blog/hello_world')
.click();

cy.contains('Edit')
.should('have.attr', 'href', '/blog/hello_world/edit')
.click();

cy.get('.x-panel.emergence-cms-editor .x-btn[id^=emergence-cms-toolbar-][id$=-menu-trigger]')
.click();

cy.contains('.x-menu-item-text[id^=menuitem-]', '1/2/2030 4:05 pm')
.click();

cy.get('input[id^=timefield-]')
.type('{selectall}6:07 pm{enter}');

cy.get('.x-component.emergence-cms-preview time[data-ref="timeEl"]')
.should('contain', 'Wednesday, January 2, 2030 at 6:07 pm')
.click();

cy.contains('.x-btn.save-btn', 'Save')
.click();

cy.reload();

cy.get('.x-component.emergence-cms-preview time[data-ref="timeEl"]')
.should('contain', 'Wednesday, January 2, 2030 at 6:07 pm');
});
});
Loading