Merge pull request #71 from mirte-robot/main #10
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: Node.js Build | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build_backend: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '16' | |
| check-latest: true | |
| - name: Install dependencies | |
| run: | | |
| cd nodejs-backend | |
| npm install | |
| npm rebuild | |
| - name: Run build | |
| run: | | |
| cd nodejs-backend | |
| exit_status=0 | |
| timeout 60 npm run backend || exit_status=$? | |
| if [[ $exit_status -eq 124 ]]; then | |
| echo "Backend ran good!" | |
| else | |
| echo "Backend run failed!" | |
| exit 1 | |
| fi | |
| # - name: Run tests | |
| # run: npm test |