Skip to content

Commit d3c06de

Browse files
committed
Merge branch 'horizon' into cnd-staging
2 parents 1746623 + c019c57 commit d3c06de

File tree

6 files changed

+32
-15
lines changed

6 files changed

+32
-15
lines changed

.github/workflows/makefile.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
jobs:
1010
build-and-test:
1111
runs-on: ubuntu-latest
12+
timeout-minutes: 30
1213

1314
steps:
1415
- name: Checkout repository
@@ -20,6 +21,19 @@ jobs:
2021
node-version: '24'
2122
cache: 'npm'
2223

24+
- name: "Configure AWS Credentials"
25+
uses: aws-actions/[email protected]
26+
with:
27+
aws-region: us-east-1
28+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
29+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
30+
if: github.event_name != 'pull_request'
31+
32+
- name: S3 test
33+
run: |
34+
aws s3 ls s3://pyret-horizon/new-horizons
35+
if: github.event_name != 'pull_request'
36+
2337
- name: Install Chrome and ChromeDriver
2438
run: |
2539
# Get latest stable Chrome version
@@ -75,6 +89,7 @@ jobs:
7589
echo "SHARED_FETCH_SERVER=https://code.pyret.org" >> $GITHUB_ENV
7690
echo "URL_FILE_MODE=all-remote" >> $GITHUB_ENV
7791
echo "IMAGE_PROXY_BYPASS=true" >> $GITHUB_ENV
92+
echo "POSTMESSAGE_ORIGIN=*" >> $GITHUB_ENV
7893
7994
- name: Start application server
8095
run: |
@@ -89,18 +104,20 @@ jobs:
89104
90105
- name: Run tests
91106
run: |
92-
# Set up virtual display for headless browser testing
93-
export DISPLAY=:99
94-
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
95-
96107
# Wait a bit more for everything to be ready
97108
sleep 3
98109
99110
# Run tests based on event type
100111
if [ "${{ github.event_name }}" = "pull_request" ]; then
101112
echo "Running PR tests (excluding modules)"
102-
npx mocha --grep modules --invert
113+
npm run mocha -- --grep modules --invert
103114
else
104115
echo "Running all tests"
105-
npx mocha
116+
npm run mocha
106117
fi
118+
119+
- name: Copy cpo-main and related JS to S3
120+
run: |
121+
aws s3 sync ./build/web/js s3://pyret-horizon/horizon-action-test --acl public-read --exclude "*" --include "cpo-main.jarr.gz.js" --content-encoding gzip
122+
aws s3 sync ./build/web/js s3://pyret-horizon/horizon-action-test --acl public-read --exclude "cpo-main.jarr.js.gz"
123+
if: github.event_name != 'pull_request'

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ and test out the REPL, you only need to edit a few variables. If you want to
1717
use the standalone pyret that comes with the checkout, you can just set
1818

1919
```
20-
PYRET="http://localhost:5000/js/cpo-main.jarr"
20+
PYRET="http://localhost:4999/js/cpo-main.jarr"
2121
```
2222

2323
Then you can run
@@ -39,7 +39,7 @@ it doesn't need to be terminated across builds), run:
3939
$ npm start
4040
```
4141

42-
The editor will be served from `http://localhost:5000/editor`.
42+
The editor will be served from `http://localhost:4999/editor`.
4343

4444
If you edit JavaScript or HTML files in `src/web`, run
4545

@@ -75,15 +75,15 @@ At https://console.developers.google.com/project, make a project, then:
7575
Credentials -> Create Credentials -> OAuth Client Id
7676

7777
For development, you should set the javascript origins to
78-
`http://localhost:5000` and the redirect URI to
79-
`http://localhost:5000/oauth2callback`.
78+
`http://localhost:4999` and the redirect URI to
79+
`http://localhost:4999/oauth2callback`.
8080

8181
- For `GOOGLE_API_KEY`, which is used in the browser to make certain public
8282
requests when users are not logged in yet:
8383

8484
Credentials -> Create Credentials -> API Key -> Browser Key
8585

86-
Again, you should use `http://localhost:5000` as the referer for development.
86+
Again, you should use `http://localhost:4999` as the referer for development.
8787

8888

8989
- Add the Google Drive API to your project and include the Google Drive API

src/web/js/beforePyret.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1468,7 +1468,7 @@ $(function() {
14681468
initialState
14691469
});
14701470
}
1471-
else if((window.parent && (window.parent !== window)) || process.env.NODE_ENV === "development") {
1471+
else if((window.parent && (window.parent !== window))) {
14721472
window.MESSAGES = makeEvents({ CPO: CPO, sendPort: window.parent, receivePort: window, initialState });
14731473
}
14741474
});

test/embed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ describe("Embedding API Basics – Single embedded instance", function() {
4545
this.browser.call(done);
4646
});
4747

48-
it("should load starter files", function(done) {
48+
xit("should load starter files", function(done) {
4949
this.timeout(15000);
5050
var self = this;
5151
this.browser.get(this.base + "/embed/embed1.html?" + this.base);

test/modules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var tester = require("../test-util/util.js");
22

3-
describe("Running Module programs", function() {
3+
xdescribe("Running Module programs", function() {
44
beforeEach(tester.setup);
55
afterEach(tester.teardown);
66

test/sheets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var tester = require("../test-util/util.js");
22

3-
describe("Running Google Sheets programs", function() {
3+
xdescribe("Running Google Sheets programs", function() {
44
beforeEach(tester.setup);
55
afterEach(tester.teardown);
66

0 commit comments

Comments
 (0)