Browse Source

chore(action): run ci/cd based on commits

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/560/head
Pranav C 3 years ago
parent
commit
9257b93ef2
  1. 16
      .github/workflows/ci-cd.yml
  2. 1
      .github/workflows/release-npm.yml

16
.github/workflows/ci-cd.yml

@ -14,7 +14,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check for update
run: |
echo "CHANGED=$([[ $(lerna ls --since ${{github.event.before}} | grep nc-gui) = nc-gui]] && echo 'OK')" >> $GITHUB_ENV
- name: Cypress run
if: ${{ env.CHANGED == 'OK' }}
uses: cypress-io/github-action@v2
with:
start: docker-compose -f ./docker-compose-cypress.yml up -d
@ -27,10 +34,17 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check for update
run: |
echo "CHANGED=$([[ $(lerna ls --since ${{github.event.before}} | grep nocodb) = nocodb]] && echo 'OK')" >> $GITHUB_ENV
- name: Test Mysql REST APIs
if: ${{ env.CHANGED == 'OK' }}
run: cd ./packages/nocodb/ && docker-compose run xc-test-mysql
- name: Test Mysql GraphQL APIs
if: ${{ env.CHANGED == 'OK' }}
run: cd ./packages/nocodb/ && docker-compose run xc-test-gql-mysql
# - name: Test MSSQL REST APIs
@ -39,8 +53,10 @@ jobs:
# run: cd ./packages/nocodb/ && docker-compose run xc-test-gql-mssql
#
- name: Test PostgreSQL REST APIs
if: ${{ env.CHANGED == 'OK' }}
run: cd ./packages/nocodb/ && docker-compose run xc-test-pg
- name: Test PostgreSQL GraphQL APIs
if: ${{ env.CHANGED == 'OK' }}
run: cd ./packages/nocodb/ && docker-compose run xc-test-gql-pg
#
# - name: Test SQLite3 REST APIs

1
.github/workflows/release-npm.yml

@ -32,6 +32,7 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Loading…
Cancel
Save