Dynamfit & Parameterized Query Migration #889
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| branches: [develop] | |
| push: | |
| branches: [develop] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| # Frontend App Tests (Node 22 + pnpm) | |
| - name: Setup Node.js 22 for frontend | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '22' | |
| - name: Enable pnpm for frontend | |
| run: corepack enable && corepack prepare pnpm@latest --activate | |
| - name: Cache pnpm dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.pnpm-store | |
| key: ${{ runner.os }}-pnpm-${{ hashFiles('app/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm- | |
| - name: Install frontend dependencies | |
| run: | | |
| cd app | |
| pnpm install --frozen-lockfile | |
| env: | |
| MM_GHT: ${{ secrets.MM_GHT }} | |
| # - name: App Coverage Test | |
| # run: | | |
| # cd app | |
| # pnpm run test:unit -- --coverage | |
| # env: | |
| # CI: true | |
| # - name: Upload Test Coverage | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: app-coverage-report | |
| # path: app/coverage | |
| # Restful Service Tests (Node 17.9.1 + npm) | |
| - name: Setup Node.js 17.9.1 for restful service | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '17.9.1' | |
| - name: Cache npm dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.npm | |
| key: | |
| ${{ runner.os }}-node-${{ | |
| hashFiles('resfulservice/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Install restful service dependencies | |
| run: | | |
| cd resfulservice | |
| npm install | |
| - name: Run restful service tests | |
| run: | | |
| cd resfulservice | |
| npm run test | |
| env: | |
| CI: true | |
| - run: npm install | |
| # - run: npm run test | |
| BuildFrontend: | |
| needs: [test] | |
| uses: Duke-MatSci/materialsmine/.github/workflows/builder.yml@develop | |
| with: | |
| myid: app | |
| context: ./app | |
| dockerfile: Dockerfile.stage | |
| tags: dukematsci/dev-app:latest | |
| secrets: | |
| DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
| DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
| MM_GHT: ${{ secrets.MM_GHT }} | |
| FE_PORT: ${{ secrets.FE_PORT }} | |
| BuildProxy: | |
| needs: [test] | |
| uses: Duke-MatSci/materialsmine/.github/workflows/builder.yml@develop | |
| with: | |
| myid: proxy | |
| context: ./nginx | |
| tags: dukematsci/dev-proxy:latest | |
| secrets: | |
| DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
| DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
| BuildRESTFUL: | |
| needs: [test] | |
| uses: Duke-MatSci/materialsmine/.github/workflows/builder.yml@develop | |
| with: | |
| myid: restful | |
| context: ./resfulservice | |
| dockerfile: Dockerfile | |
| tags: dukematsci/dev-restful:latest | |
| secrets: | |
| DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
| DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
| BuildManagedServices: | |
| needs: [test] | |
| uses: Duke-MatSci/materialsmine/.github/workflows/builder.yml@develop | |
| with: | |
| myid: managedservices | |
| context: ./services | |
| tags: dukematsci/dev-managedservices:latest | |
| secrets: | |
| DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
| DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
| BuildWhyis: | |
| if: github.event_name == 'push' | |
| uses: Duke-MatSci/materialsmine/.github/workflows/builder.yml@develop | |
| with: | |
| myid: kgapp | |
| context: ./whyis | |
| tags: dukematsci/dev-kgapp:latest | |
| secrets: | |
| DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
| DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
| TestBuild: | |
| if: github.event_name != 'push' | |
| runs-on: ubuntu-latest | |
| needs: [BuildFrontend, BuildRESTFUL, BuildProxy, BuildWhyis] | |
| env: | |
| MM_MONGO_USER: ${{secrets.MM_MONGO_USER}} | |
| MM_MONGO_PWD: ${{secrets.MM_MONGO_PWD}} | |
| MONGO_TEST: ${{secrets.MONGO_TEST}} | |
| MONGO_TEST_PWD: ${{secrets.MONGO_TEST_PWD}} | |
| MM_DB: ${{secrets.MM_DB}} | |
| MONGO_ADDRESS: ${{secrets.MONGO_ADDRESS}} | |
| MONGO_PORT: ${{secrets.MONGO_PORT}} | |
| NM_MONGO_DUMP: ${{secrets.NM_MONGO_DUMP}} | |
| TKNS: ${{secrets.TKNS}} | |
| MINIO_ROOT_USER: ${{secrets.MINIO_ROOT_USER}} | |
| MINIO_ROOT_PASSWORD: ${{secrets.MINIO_ROOT_PASSWORD}} | |
| PROXY_PORT: ${{secrets.PROXY_PORT}} | |
| MINIO_PORT: ${{secrets.MINIO}} | |
| ES_PORT: ${{secrets.ES_PORT}} | |
| PORT: ${{secrets.PORT}} | |
| CLIENT_PORT: ${{secrets.CLIENT_PORT}} | |
| KG_PORT: ${{secrets.KG_PORT}} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Download and run images | |
| run: docker-compose -f docker-compose.git.yml up -d | |
| - name: Kill containers | |
| run: docker-compose down -v |