Browse Source

feat(workflows): sync with develop

pull/3759/head
Wing-Kam Wong 2 years ago
parent
commit
db145d3462
  1. 40
      .github/workflows/ci-cd.yml
  2. 4
      .github/workflows/release-draft.yml
  3. 15
      .github/workflows/release-nocodb.yml

40
.github/workflows/ci-cd.yml

@ -11,6 +11,7 @@ on:
- "packages/nocodb/**"
- ".github/workflows/ci-cd.yml"
pull_request:
types: [ready_for_review]
branches: [develop]
paths:
- "packages/nc-gui/**"
@ -635,3 +636,42 @@ jobs:
name: cy-quick-pg-snapshots
path: scripts/cypress/screenshots
retention-days: 2
unit-tests:
runs-on: ubuntu-20.04
steps:
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 16.15.0
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: install dependencies nocodb-sdk
working-directory: ./packages/nocodb-sdk
run: npm install
- name: build nocodb-sdk
working-directory: ./packages/nocodb-sdk
run: npm run build:main
- name: Install dependencies
working-directory: ./packages/nocodb
run: npm install
- name: setup mysql
working-directory: ./
run: docker-compose -f ./scripts/docker-compose-cypress.yml up -d
- name: run unit tests
working-directory: ./packages/nocodb
run: npm run test:unit

4
.github/workflows/release-draft.yml

@ -49,9 +49,9 @@ jobs:
# the SHA from the third commit (i.e. Auto PR from master to develop) will be taken
# else HEAD will be taken
run: |
TARGET_SHA=$(git rev-parse HEAD~2)
TARGET_SHA=$(git rev-list -n 3 HEAD | tail -1)
if [[ ${{ github.event.inputs.tagHeadSHA || inputs.tagHeadSHA }} == "Y" ]]; then
TARGET_SHA=$(git rev-parse HEAD)
TARGET_SHA=$(git rev-list -n 1 HEAD | tail -1)
fi
echo "::set-output name=TARGET_SHA::${TARGET_SHA}"
echo "Setting TARGET_SHA: ${TARGET_SHA}"

15
.github/workflows/release-nocodb.yml

@ -103,24 +103,17 @@ jobs:
secrets:
NC_GITHUB_TOKEN: "${{ secrets.NC_GITHUB_TOKEN }}"
# Close all issues with target tags 'Fixed' & 'Resolved'
close-fixed-issues:
# Close all issues with target tags 'Status: Ready for Next Release'
close-issues:
needs: [release-docker, process-input]
uses: ./.github/workflows/release-close-issue.yml
with:
issue_label: 'Status: Fixed'
version: ${{ needs.process-input.outputs.target_tag }}
close-resolved-issues:
needs: [close-fixed-issues, process-input]
uses: ./.github/workflows/release-close-issue.yml
with:
issue_label: 'Status: Resolved'
issue_label: 'Status: Ready for Next Release'
version: ${{ needs.process-input.outputs.target_tag }}
# Publish Docs
publish-docs:
needs: close-resolved-issues
needs: close-issues
uses: ./.github/workflows/publish-docs.yml
secrets:
GH_TOKEN: "${{ secrets.GH_TOKEN }}"

Loading…
Cancel
Save