I need to test all commits that come with a given push or pull request and not just the last commit.
I analyzed some questions and answers here in the community and found the following: [Click Here]
However, I checked the pipeline and I'm getting the following error:
And he's not pushing all the commits, just the last one yet.
My .yaml:
# prettier-ignore
name: CONTINUOUS INTEGRATION
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
architecture: [x64]
steps:
- name: Check out Git repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- run: |
for commit in $(git rev-list ${{ github.base_ref }}..${{ github.head_ref }}); do
git checkout $commit
echo "run test"
done
- name: Use Nodejs ${{ matrix.node-version }} - ${{ matrix.architecture }}
uses: actions/setup-node@v2
- name: Yarn [Install]
uses: borales/actions-yarn@v2.0.0
with:
cmd: install
- name: Yarn [Lint]
uses: borales/actions-yarn@v2.0.0
with:
cmd: lint-check
- name: Yarn [Test]
uses: borales/actions-yarn@v2.0.0
with:
cmd: test
deploy:
if: ${{ github.ref == 'refs/heads/master' }}
needs: tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
architecture: [x64]
steps:
- name: Check out Git repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- run: |
for commit in $(git rev-list ${{ github.base_ref }}..${{ github.head_ref }}); do
git checkout $commit
echo "run test"
done
- name: Vercel Deploy
uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-args: '--prod'
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}}
env:
REACT_APP_AUTHOR: ${{ secrets.REACT_APP_AUTHOR }}
REACT_APP_DESCRIPTION: ${{ secrets.REACT_APP_DESCRIPTION }}
REACT_APP_KEYWORDS: ${{ secrets.REACT_APP_KEYWORDS }}
REACT_APP_TITLE: ${{ secrets.REACT_APP_TITLE }}
What is this? How to solve?
