Skip to content

Commit

Permalink
add only one test for ci
Browse files Browse the repository at this point in the history
Signed-off-by: Erick Wendel <[email protected]>
  • Loading branch information
ErickWendel committed Jul 29, 2024
1 parent 66b9c9a commit eec9daa
Show file tree
Hide file tree
Showing 3 changed files with 482 additions and 468 deletions.
68 changes: 36 additions & 32 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,46 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Set up Docker Compose
run: |
sudo rm /usr/local/bin/docker-compose
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /tmp/docker-compose
chmod +x /tmp/docker-compose
sudo mv /tmp/docker-compose /usr/local/bin/docker-compose
- name: Start nodered
run: npm run docker:start-nodered

- name: Restore dependencies
run: npm ci

- name: Install Chromium browser only
run: npx playwright install chromium --with-deps

- name: install nodered custom module
run: npm run docker:install-module

- name: Run Playwright tests
run: npm test
- name: Run Node.js script
shell: bash
env:
GOOGLE_SHEETS_AUTH_FILE: ${{ secrets.GOOGLE_SHEETS_AUTH_FILE }}

- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30

- name: Clean up
run: npm run docker:clean
run: node index.js
# - name: Set up Docker Compose
# run: |
# sudo rm /usr/local/bin/docker-compose
# curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /tmp/docker-compose
# chmod +x /tmp/docker-compose
# sudo mv /tmp/docker-compose /usr/local/bin/docker-compose

# - name: Start nodered
# run: npm run docker:start-nodered

# - name: Restore dependencies
# run: npm ci

# - name: Install Chromium browser only
# run: npx playwright install chromium --with-deps

# - name: install nodered custom module
# run: npm run docker:install-module

# - name: Run Playwright tests
# run: npm test
# env:
# GOOGLE_SHEETS_AUTH_FILE: ${{ secrets.GOOGLE_SHEETS_AUTH_FILE }}

# - uses: actions/upload-artifact@v4
# if: always()
# with:
# name: playwright-report
# path: playwright-report/
# retention-days: 30

# - name: Clean up
# run: npm run docker:clean
10 changes: 10 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
console.log('GOOGLE_SHEETS_AUTH_FILE:', process.env.GOOGLE_SHEETS_AUTH_FILE ? 'Exists' : 'Not set');

// Additional debugging
if (process.env.GOOGLE_SHEETS_AUTH_FILE) {
const secretData = JSON.parse(process.env.GOOGLE_SHEETS_AUTH_FILE);
console.log('Secret JSON keys:', Object.keys(secretData));
process.exit(0)
}

process.exit(1)
Loading

0 comments on commit eec9daa

Please sign in to comment.