diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..6b70699 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,47 @@ +name: Main CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js 16.x + uses: actions/setup-node@v3 + with: + node-version: '16.x' + + - name: Install and Build + run: | + cd nest + npm ci + npm run build --if-present + + test: + needs: build + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js 16.x + uses: actions/setup-node@v3 + with: + node-version: '16.x' + + - name: Install Dependencies + run: | + cd nest + npm ci + + - name: Test Nest JS + run: | + cd nest + npm run test