Merge pull request #6 from BFlorian91/crud_snippet #30
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: CI | |
on: push | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "16" # Spécifiez la version de Node.js que vous utilisez | |
- name: Install Dependencies | |
run: npm install | |
- name: Run Linter | |
run: npm run lint | |
- name: Run Unit Tests | |
run: npm run test | |
- name: Create Pull Request | |
if: github.event_name == 'push' && github.ref == 'refs/heads/feature/**' | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: "Automated PR - ${{ github.event.head_commit.message }}" | |
title: "Automated PR: ${{ github.event.head_commit.message }}" | |
body: "${{ github.event.head_commit.message }}" | |
branch: "ci-autopr-${{ github.run_id }}" | |
base: main |