Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
b501fd1
Create workflow
nixstrom Sep 20, 2021
5c3a501
Remove faulty line
nixstrom Sep 20, 2021
c4f08bd
Delete whitespace
nixstrom Sep 20, 2021
e2e3a06
Add workflow dispatch
nixstrom Sep 20, 2021
5359a84
Fix formatting
nixstrom Sep 20, 2021
dd04e65
Change syntax
nixstrom Sep 26, 2021
f98916e
add push event
nixstrom Sep 26, 2021
4b78d48
Add condition
nixstrom Sep 26, 2021
0f947e6
add Cypress
nixstrom Sep 26, 2021
32d3c72
Fix Cypress flow
nixstrom Sep 26, 2021
fb98b1e
use correct Cypress command
nixstrom Sep 26, 2021
9313158
fix YAML syntax
nixstrom Sep 26, 2021
5adb182
fix YAML syntax
nixstrom Sep 26, 2021
ebce11a
Fix URL
nixstrom Sep 26, 2021
fd59536
Remove protocol
nixstrom Sep 26, 2021
cd52299
Readd protocol
nixstrom Sep 27, 2021
420fa2e
Use HTTP domain
nixstrom Sep 28, 2021
e974929
Try different HTTPS URI
nixstrom Sep 28, 2021
46112ba
Run E2E against main domain
nixstrom Sep 28, 2021
8ca2689
Run E2E against app subdomain
nixstrom Sep 28, 2021
75149ed
Try different subdomain
nixstrom Sep 28, 2021
df42c7d
Run e2e against underlying Render URL
nixstrom Sep 28, 2021
c446f09
Run Cypress as regular npm script
nixstrom Oct 4, 2021
e471d68
run install script
nixstrom Oct 4, 2021
0ba3de9
Remove unsupported ci flag
nixstrom Oct 4, 2021
8805340
Attempt to run headed
nixstrom Oct 4, 2021
4f7a02f
Run e2e against underlying URL
nixstrom Oct 17, 2021
3ed3cd0
use config in action
nixstrom Oct 17, 2021
8bb100d
disable media
nixstrom Oct 17, 2021
2d0dca4
Add wait
nixstrom Oct 17, 2021
c657b19
Use normal node script
nixstrom Oct 17, 2021
785b372
Add Cypress media artifacts
nixstrom Oct 18, 2021
5feed2e
Add Circle CI config
nixstrom Oct 30, 2021
94ac0a7
Updated config.yml
nixstrom Oct 30, 2021
f9f4b15
Updated config.yml
nixstrom Oct 30, 2021
2a81752
Updated config.yml
nixstrom Oct 30, 2021
8b979e3
Updated config.yml
nixstrom Oct 30, 2021
5b6c4aa
Updated config.yml
nixstrom Oct 30, 2021
3160e38
Updated config.yml
nixstrom Oct 30, 2021
92505cf
Updated config.yml
nixstrom Oct 30, 2021
2d6e069
Updated config.yml
nixstrom Oct 30, 2021
5fc4908
Updated config.yml
nixstrom Oct 30, 2021
046157f
Updated config.yml
nixstrom Oct 30, 2021
0597769
Updated config.yml
nixstrom Oct 30, 2021
e2e0748
Use HTTP for Netlify
nixstrom Nov 7, 2021
5e4e656
Use HTTPS
nixstrom Nov 18, 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
22 changes: 22 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This config is equivalent to both the '.circleci/extended/orb-free.yml' and the base '.circleci/config.yml'
version: 2.1

jobs:
build:
docker:
- image: cypress/base:8
environment:
## this enables colors in the output
TERM: xterm
steps:
- checkout
- run:
name: Install npm
command: npm install
- run:
name: Install Cypress
command: npx cypress install
- run:
name: Run cypress ffs
command: npm run e2e:ci

37 changes: 37 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: postdeploy

on: [push, deployment_status, workflow_dispatch]

jobs:
e2e:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2-beta
with:
node-version: 16

- name: Run Cypress
uses: cypress-io/github-action@v2
with:
command: yarn e2e:ci
env: JS_APP_URL=https://bool-test-apps.onrender.com
config: video=true,screenshotOnRunFailure=true

- name: Archive test screenshots
uses: actions/upload-artifact@v1
with:
name: screenshots
path: cypress/screenshots
if: ${{ failure() }}

- name: Archive test videos
uses: actions/upload-artifact@v1
with:
name: videos
path: cypress/videos
if: ${{ failure() }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,9 @@ yarn-error.log*

### Output of 'npm pack' ###
*.tgz

### Cypress ###
cypress/results/*
cypress/reports/*
cypress/screenshots/*
cypress/videos/*
3 changes: 2 additions & 1 deletion cypress/integration/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ const DATA_EXAMPLE = {
};

describe('Core JS app', () => {
beforeEach(() => {
before(() => {
cy.visit(Cypress.env('JS_APP_URL'));
cy.wait(4000);
});

describe('getFeatures', () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = (on, config) => {
// `config` is the resolved Cypress config

// copy any needed variables from process.env to config.env
config.env.JS_APP_URL = 'http://localhost:3000/';
config.env.JS_APP_URL = process.env.JS_APP_URL;

// do not forget to return the changed config object!
return config;
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"dev": "vite",
"build": "tsc && vite build",
"serve": "vite preview",
"e2e": "cypress open"
"e2e:local": "cypress open --env JS_APP_URL=https://e2e.usebool.com",
"e2e:ci": "cypress run --env JS_APP_URL=https://e2e.usebool.com"
},
"dependencies": {
"@usebool/sdk-js": "^0.1.5"
Expand Down
2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ const composeSingularFeatures = async () => {
const featureTwo = await featureFlags.hasFeature(keys[1].key);
const featureThree = await featureFlags.hasFeature(keys[2].key);

console.log(JSON.stringify(featureOne));

return [featureOne, featureTwo, featureThree]
.map((actualValue, i) => SingleItem({ ...keys[i], actualValue }))
.join('');
Expand Down