UPDATE YAML AFTER PROTECTION TESTS #4
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 Pipeline | |
on: | |
push: | |
branches: [main, feature/**, issue/**, bug/**, hotfix/**] | |
pull_request: | |
branches: [main] | |
jobs: | |
validate-changes: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.11.1" | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Install Dependencies | |
run: npm install | |
- name: Run Prettier | |
run: npm run format:fix | |
- name: Run Linter | |
run: npm run linter | |
- name: Run Unit Tests | |
run: npm run test:unit | |
# - name: Run Integration Tests | |
# if: github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main' || github.ref == 'refs/heads/main' | |
# run: npm run test:integration |