update for Subnet Configuration Generator v1 release #35
This file contains 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: PR tests | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test_on_pr_backend: | |
name: Run backend tests on PR | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: Install dependencies | |
run: cd backend && npm install | |
- name: Run build | |
run: cd backend && npm run build # Double check we can build | |
# TODO: Tests to be added | |
# - name: Unit tests | |
# run: npm run test | |
test_on_pr_frontend: | |
name: Run frontend tests on PR | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: frontend | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: Determine Docker Image Name | |
id: image | |
run: | | |
echo "name=subnet-frontend:pr" >> $GITHUB_OUTPUT | |
- name: Docker build and tag image | |
run: docker build . --file Dockerfile --tag ${{ steps.image.outputs.name }} | |
- name: Test run docker | |
run: docker run --entrypoint /bin/sh ${{ steps.image.outputs.name }} -c 'yarn run build && yarn global add serve' |