Back : MathieuSchl push 'App is now building when the container is starting' 🚀 #144
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: Test Back-end | |
run-name: "Back : ${{ github.actor }} push '${{ github.event.head_commit.message }}' 🚀" | |
on: [push] | |
jobs: | |
Unit-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
cd back/ && npm install | |
- name: Create .env file | |
run: | | |
echo SPECIALTOKEN=$(echo $RANDOM | md5sum | head -c 20; echo;) >> back/.env | |
ls -lA back/.env | |
- name: Create summary | |
run: | | |
cd back/ && export NODE_OPTIONS=--no-experimental-fetch && npm test 2>> /tmp/results.txt >> /tmp/coverage0.txt | |
awk 'NR>5' /tmp/coverage0.txt > /tmp/coverage1.txt && sed '$ d' /tmp/coverage1.txt > $GITHUB_STEP_SUMMARY && echo -e "" >> $GITHUB_STEP_SUMMARY && cat /tmp/results.txt >> $GITHUB_STEP_SUMMARY |