Azure / static-web-apps

Azure Static Web Apps. For bugs and feature requests, please create an issue in this repo. For community discussions, latest updates, kindly refer to the Discussions Tab. To know what's new in Static Web Apps, visit https://aka.ms/swa/ThisMonth
https://aka.ms/swa
MIT License
320 stars 53 forks source link

static-web-apps-deploy test step in github action #229

Open dsurrao opened 3 years ago

dsurrao commented 3 years ago

To deploy an Angular app, I would like to add a step 'npm test' or 'ng test'. I tried adding this before the 'Build and Deploy' step in the workflow .yaml file, but the job takes a long time and does not seem to complete. Is there another way to do this? Thanks.

- name: Use Node.js ${{ env.NODE_VERSION }}
        uses: actions/setup-node@v1
        with:
          node-version: ${{ env.NODE_VERSION }}
      - name: npm install and test
        run: |
          # Build and test the project
          npm install
          npm run test --if-present
      - name: Build And Deploy
        ..
miwebst commented 3 years ago

Hey @dsurrao,

Thanks for the feedback! This is something we would like to add. For now, you can try using the app build command to both build and test your app. I think you can do something like "npm run build && npm run test --if-present"?

dsurrao commented 3 years ago

Hi @miwebst, it looks like it is still hanging on the 'npm run test' step. It'll be nice to incorporate this into the 'Build and Deploy' step here:

- name: Build And Deploy
        id: builddeploy
        uses: Azure/static-web-apps-deploy@v0.0.1-preview
       ...

Thanks.

Soremwar commented 3 years ago

Any news on this?

SweetpopcornSimon commented 1 year ago

Any update on this?