Skip to content

Commit d74df78

Browse files
committed
add e2e test
1 parent f3d0e8a commit d74df78

File tree

4 files changed

+90
-1
lines changed

4 files changed

+90
-1
lines changed

.github/workflows/create-tag.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
jobs:
8+
create_tag:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
node-version: [12.x]
13+
steps:
14+
- uses: actions/checkout@master
15+
with:
16+
persist-credentials: false
17+
- name: Build files using ${{ matrix.node-version }}
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
- name: Release new version
22+
id: release
23+
run: |
24+
npm ci
25+
npm run release
26+
env:
27+
CI: true
28+
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
29+
GIT_AUTHOR_NAME: themeisle[bot]
30+
GIT_AUTHOR_EMAIL: ${{ secrets.BOT_EMAIL }}
31+
GIT_COMMITTER_NAME: themeisle[bot]
32+
GIT_COMMITTER_EMAIL: ${{ secrets.BOT_EMAIL }}

.github/workflows/deploy-wporg.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy
2+
on:
3+
push:
4+
tags:
5+
- "*"
6+
jobs:
7+
tag:
8+
name: New version
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@master
12+
- name: Get the version
13+
id: get_version
14+
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
15+
- name: Build
16+
run: |
17+
npm ci
18+
composer install --no-dev --prefer-dist --no-progress --no-suggest
19+
- name: WordPress Plugin Deploy
20+
uses: 10up/action-wordpress-plugin-deploy@master
21+
env:
22+
SVN_PASSWORD: ${{ secrets.SVN_THEMEISLE_PASSWORD }}
23+
SVN_USERNAME: ${{ secrets.SVN_THEMEISLE_USERNAME }}
24+
- name: Send update to the store
25+
env:
26+
THEMEISLE_ID: ${{ secrets.THEMEISLE_ID }}
27+
THEMEISLE_AUTH: ${{ secrets.THEMEISLE_STORE_AUTH }}
28+
STORE_URL: ${{ secrets.THEMEISLE_STORE_URL }}
29+
BUILD_VERSION: ${{ steps.get_version.outputs.VERSION }}
30+
run: |
31+
if [ ! -z "$THEMEISLE_ID" ]; then
32+
STORE_JSON='{"version": "'$BUILD_VERSION'","id": "'$THEMEISLE_ID'","body": ""}';
33+
echo "$STORE_JSON";
34+
curl -X POST -H 'Cache-Control: no-cache' -H "Content-Type: application/json" -H "x-themeisle-auth: $THEMEISLE_AUTH" --data "$STORE_JSON" "$STORE_URL/wp-json/edd-so/v1/update_changelog/" > /dev/null
35+
fi
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Sync assets with wordpress.org
2+
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
paths:
9+
- 'readme.txt'
10+
- '.wordpress-org/**'
11+
jobs:
12+
run:
13+
runs-on: ubuntu-latest
14+
if: "! contains(github.event.head_commit.message, 'chore(release)')"
15+
name: Push assets to wporg
16+
steps:
17+
- uses: actions/checkout@master
18+
- name: WordPress.org plugin asset/readme update
19+
uses: selul/action-wordpress-plugin-asset-update@develop
20+
env:
21+
SVN_PASSWORD: ${{ secrets.SVN_THEMEISLE_PASSWORD }}
22+
SVN_USERNAME: ${{ secrets.SVN_THEMEISLE_USERNAME }}

cypress/integration/default/free-sources.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('Test Free - sources', function() {
3535
const fileName = 'pie.csv';
3636
// select file to upload
3737
cy.fixture(fileName).then(fileContent => {
38-
cy.wrap($body).find('#csv-file').upload({ fileContent, fileName, mimeType: 'text/csv' });
38+
cy.wrap($body).find('#csv-file').attachFile({ fileContent, fileName, mimeType: 'text/csv' });
3939
cy.wrap($body).find('#vz-import-file').click({force:true}).then(() => {
4040
cy.wrap($body).find('#settings-button').click({force:true});
4141
});

0 commit comments

Comments
 (0)