Skip to content

Commit

Permalink
ci: update creds, add formatter and linter
Browse files Browse the repository at this point in the history
  • Loading branch information
pixincreate committed Nov 28, 2024
1 parent 00b59d4 commit f9ed423
Showing 1 changed file with 35 additions and 13 deletions.
48 changes: 35 additions & 13 deletions .github/workflows/cypress-tests-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,40 @@ jobs:
if: ${{ env.RUN_TESTS == 'true' }}
uses: actions/checkout@v4

- name: Install Node.js
if: ${{ env.RUN_TESTS == 'true' }}
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install Cypress and dependencies
if: ${{ env.RUN_TESTS == 'true' }}
run: |
npm ci --prefix ./cypress-tests
- name: Check formatting
if: ${{ env.RUN_TESTS == 'true' }}
run: |
npm run format:check && npm run lint
if [ $? -ne 0 ]; then
echo "::notice::Formatting or lint check failed"
git config --local user.name 'hyperswitch-bot[bot]'
git config --local user.email '148525504+hyperswitch-bot[bot]@users.noreply.github.com'
# Run prettier to fix formatting
npm run format
# Run eslint with --fix flag to auto-fix linting issues
npm run lint -- --fix
# Add changes to git and commit
git add .
git commit --message 'chore: run formatter and lint fixes'
git push
fi
- name: Download Encrypted TOML from S3 and Decrypt
if: ${{ env.RUN_TESTS == 'true' }}
env:
Expand All @@ -69,7 +103,7 @@ jobs:
CONNECTOR_AUTH_PASSPHRASE: ${{ secrets.CONNECTOR_AUTH_PASSPHRASE }}
CONNECTOR_CREDS_S3_BUCKET_URI: ${{ secrets.CONNECTOR_CREDS_S3_BUCKET_URI}}
DESTINATION_FILE_NAME: "creds.json.gpg"
S3_SOURCE_FILE_NAME: "5a3f7679-445e-4621-86c5-39bd8d26b7c5.json.gpg"
S3_SOURCE_FILE_NAME: "91eddfc6-2e7b-4e63-a663-5bcb630851fd.json.gpg"
shell: bash
run: |
mkdir -p ".github/secrets" ".github/test"
Expand Down Expand Up @@ -133,18 +167,6 @@ jobs:
tool: just
checksum: true

- name: Install Node.js
if: ${{ env.RUN_TESTS == 'true' }}
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install Cypress and dependencies
if: ${{ env.RUN_TESTS == 'true' }}
run: |
npm ci --prefix ./cypress-tests
- name: Run database migrations
if: ${{ env.RUN_TESTS == 'true' }}
shell: bash
Expand Down

0 comments on commit f9ed423

Please sign in to comment.