Skip to content

Commit

Permalink
Adding sql lint test
Browse files Browse the repository at this point in the history
  • Loading branch information
grebois committed May 9, 2024
1 parent 487a802 commit 2d1bcd2
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 38 deletions.
76 changes: 38 additions & 38 deletions .github/workflows/frontend-test.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
name: frontend-tests

on:
push:
branches:
- development
pull_request:
branches:
- development
jobs:
frontend-tests:
name: Run Frontend Tests
runs-on: ubuntu-latest
# if: |
# contains(github.event.pull_request.changed_files, 'web/')
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '22'

- name: Install Node dependencies
run: |
cd web
npm install
- name: Run Jest tests
run: |
cd web
npm run test:jest
- name: Run Cypress tests
run: |
cd web
npm run test:cypress
#name: frontend-tests
#
#on:
# push:
# branches:
# - development
# pull_request:
# branches:
# - development
#jobs:
# frontend-tests:
# name: Run Frontend Tests
# runs-on: ubuntu-latest
## if: |
## contains(github.event.pull_request.changed_files, 'web/')
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
#
# - name: Set up Node.js
# uses: actions/setup-node@v3
# with:
# node-version: '22'
#
# - name: Install Node dependencies
# run: |
# cd web
# npm install
#
# - name: Run Jest tests
# run: |
# cd web
# npm run test:jest
#
# - name: Run Cypress tests
# run: |
# cd web
# npm run test:cypress
26 changes: 26 additions & 0 deletions .github/workflows/sqlfluff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: sqlfluff

on:
push:
branches:
- development
pull_request:
branches:
- development

jobs:
sqlfluff:
name: sqlfluff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: yu-iskw/action-sqlfluff@v3
id: lint-sql
with:
github_token: ${{ secrets.github_token }}
paths: '${{ github.workspace }}/db/migrations'
- name: 'Show outputs (Optional)'
shell: bash
run: |
echo '${{ steps.lint-sql.outputs.sqlfluff-results }}' | jq -r '.'
echo '${{ steps.lint-sql.outputs.sqlfluff-results-rdjson }}' | jq -r '.'

0 comments on commit 2d1bcd2

Please sign in to comment.