Skip to content

Commit

Permalink
Merge branch 'master' into Newly-Added-Attributes-Only-Visible
Browse files Browse the repository at this point in the history
  • Loading branch information
MirzaHanan authored Oct 2, 2024
2 parents 1c1a3fc + 7c94f52 commit 274e656
Show file tree
Hide file tree
Showing 161 changed files with 5,369 additions and 4,022 deletions.
80 changes: 57 additions & 23 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,8 +49,8 @@ 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
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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 274e656

Please sign in to comment.