Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into edit-modal
Browse files Browse the repository at this point in the history
  • Loading branch information
sophieturner0 committed Oct 15, 2024
2 parents f179998 + cbbe490 commit aace668
Show file tree
Hide file tree
Showing 311 changed files with 11,594 additions and 7,101 deletions.
82 changes: 58 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,40 @@ on:
branches:
- master
jobs:
get-cypress-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: ./sphinx-nav-fiber

- name: Debug test files
working-directory: ./sphinx-nav-fiber
run: |
find cypress/e2e -name '*.spec.js' -o -name '*.cy.ts' | jq -R -s -c 'split("\n") | map(select(. != ""))'
- name: List Cypress test files
id: list-tests
working-directory: ./sphinx-nav-fiber
run: |
tests=$(find cypress/e2e -name '*.spec.js' -o -name '*.cy.ts' | jq -R -s -c 'split("\n") | map(select(. != ""))')
if [ -z "$tests" ]; then
echo "No Cypress test files found."
tests="[]"
fi
echo "::set-output name=tests::$tests"
outputs:
tests: ${{ steps.list-tests.outputs.tests }}

cypress-run:
runs-on: ubuntu-latest
needs: get-cypress-tests
strategy:
fail-fast: false
matrix:
file: ${{ fromJson(needs.get-cypress-tests.outputs.tests) }}
steps:
- name: Enable docker.host.internal for Ubuntu
run: |
Expand All @@ -17,11 +49,11 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
node-version-file: ".nvmrc"
cache: "yarn"
- name: Clone Stack
run: |
git clone https://github.com/stakwork/sphinx-stack.git stack
git clone -b multipleWorkers https://github.com/stakwork/sphinx-stack.git stack
- name: Give Permissions to Sphinx Nav Fiber
run: chmod 777 -R relay
Expand All @@ -35,18 +67,18 @@ jobs:
chmod 777 -R ./proxy;
chmod 777 -R ./cln;
- name: Download file
run: |
curl -LO https://machinelearningneo4jbackup.s3.amazonaws.com/_data.zip
# - name: Create data working-directory
# run: mkdir -p data

- name: Unzip file
run: unzip _data.zip -d data
# - name: Download file
# run: |
# curl -LO https://machinelearningneo4jbackup.s3.amazonaws.com/neo4j.tar

- name: Rename folder
run: cd data && mv _data data && cd data && ls
# - name: untar file
# run: tar -xf neo4j.tar -C data

- name: Copy Neo4J Data to stack
run: cp -r ./data ./stack/neo4j
# - name: Copy Neo4J Data to stack
# run: cp -r ./data ./stack/neo4j

- name: Check for NODES
uses: nick-fields/retry@v3
Expand All @@ -67,8 +99,11 @@ jobs:
- name: Copy Node.json
uses: canastro/copy-file-action@master
with:
source: 'stack/relay/NODES.json'
target: 'relay/nodes.json'
source: "stack/relay/NODES.json"
target: "relay/nodes.json"

- name: Sanitize Test File Path
run: echo "SANITIZED_FILE=$(echo ${{ matrix.file }} | sed 's/\//_/g')" >> $GITHUB_ENV

- name: Install
run: yarn --immutable
Expand All @@ -81,28 +116,27 @@ jobs:
browser: chrome
headless: true
start: yarn run start-e2e
wait-on: 'http://localhost:3000' # Waits for above
spec: ${{ matrix.file }}
wait-on: "http://localhost:3000" # Waits for above
wait-on-timeout: 120 # Waits for 2 minutes
# Records to Cypress Dashboard
record: true
record: false
video: true
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# created by the GH Action automatically
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Component tests
run: yarn run cy-comp
continue-on-error: false
# - name: Component tests
# run: yarn run cy-comp
# continue-on-error: false

- name: Upload Cypress logs
if: failure()
if: always()
uses: actions/upload-artifact@v4
with:
name: cypress-logs
name: "${{ env.SANITIZED_FILE }}-cypress-logs"
path: cypress/videos

- name: Check the coverage value
run: yarn test-coverage

- name: Stop Stack
working-directory: ./stack
run: docker compose down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ RUN yarn run build-docker

FROM nginx:alpine
COPY --from=build /usr/src/app/build /usr/share/nginx/html
COPY --from=build /usr/src/app/deploy/nginx.conf /etc/nginx/conf.d/default.conf
8 changes: 8 additions & 0 deletions build/AbcIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions build/AlphabetIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions build/BookIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions build/BrowseIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions build/CalculateIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions build/CalculatorIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit aace668

Please sign in to comment.