Repository navigation
chore(angular-image-optimizer): bump to 0.1.2 #4
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| commitlint: | |
| name: Validate commit messages | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| - name: Validate commits | |
| run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose | |
| lint: | |
| name: Lint affected | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| - name: Set Nx base | |
| run: | | |
| if [ "${{ github.event_name }}" == "pull_request" ]; then | |
| echo "NX_BASE=${{ github.event.pull_request.base.sha }}" >> $GITHUB_ENV | |
| else | |
| echo "NX_BASE=HEAD~1" >> $GITHUB_ENV | |
| fi | |
| - name: Lint affected | |
| run: npx nx affected --target=lint | |
| test: | |
| name: Test affected | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| - name: Set Nx base | |
| run: | | |
| if [ "${{ github.event_name }}" == "pull_request" ]; then | |
| echo "NX_BASE=${{ github.event.pull_request.base.sha }}" >> $GITHUB_ENV | |
| else | |
| echo "NX_BASE=HEAD~1" >> $GITHUB_ENV | |
| fi | |
| - name: Test affected | |
| run: npx nx affected --target=test |