Skip to content

Commit

Permalink
fix: script ci
Browse files Browse the repository at this point in the history
  • Loading branch information
davidecarpini committed Mar 26, 2024
1 parent e11f587 commit 986c84f
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 39 deletions.
68 changes: 33 additions & 35 deletions .github/workflows/test-e2e.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,42 @@
name: E2E Tests

on:
push:
branches: [main]
pull_request:
branches: [main]
push:
branches: [main]
pull_request:
branches: [main]

concurrency:
group: ${{ github.head_ref || github.ref_name }}-e2e-test
cancel-in-progress: true

jobs:
e2e-tests:
runs-on: ubuntu-latest
name: E2E Tests

steps:
- name: Install Stable Chrome
run: |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install google-chrome-stable
- name: Install Stable chromedriver
uses: nanasess/setup-chromedriver@v2

- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: 'yarn'

- name: Install
run: yarn install:all

- name: Run E2E Tests
run: yarn run test:e2e


e2e-tests:
runs-on: ubuntu-latest
name: E2E Tests

steps:
- name: Install Stable Chrome
run: |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install google-chrome-stable
- name: Install Stable chromedriver
uses: nanasess/setup-chromedriver@v2

- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: 'yarn'

- name: Install
run: yarn install:all

- name: Run E2E Tests
run: yarn run test:e2e:ci
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"purge": "npx turbo@latest run purge && rm -rf node_modules",
"reinstall": "yarn clean && yarn purge && yarn && yarn run build:deps",
"test": "turbo run test --filter='@vechain/*'",
"test:e2e": "turbo run test:e2e"
"test:e2e": "turbo run test:e2e",
"test:e2e:ci": "turbo run test:e2e:ci"
},
"husky": {
"hooks": {
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"main": "index.js",
"scripts": {
"test:debug": "DEBUG=cucumber yarn test",
"test:e2e": "SELENIUM_HEADLESS=true cucumber-js"
"test:e2e": "cucumber-js",
"test:e2e:ci": "SELENIUM_HEADLESS=true cucumber-js"
},
"dependencies": {},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"dependsOn": ["build"]
},
"preview": {
"dependsOn": ["build"]
"dependsOn": ["^preview", "build"]
},
"test:e2e": {
"dependsOn": ["preview"]
"dependsOn": ["preview", "build"]
},
"lint": {},
"dev": {
Expand Down

0 comments on commit 986c84f

Please sign in to comment.