|
| 1 | +name: update-snapshots |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: "0 15 * * *" # every day 11am EST |
| 6 | + |
| 7 | +jobs: |
| 8 | + check: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + steps: |
| 11 | + - name: Checkout |
| 12 | + uses: actions/checkout@v3 |
| 13 | + |
| 14 | + - name: Set up Node 14 |
| 15 | + uses: actions/setup-node@v3 |
| 16 | + with: |
| 17 | + node-version: 14 |
| 18 | + |
| 19 | + - name: Set up Docker Buildx |
| 20 | + id: buildx |
| 21 | + uses: docker/setup-buildx-action@v2 |
| 22 | + |
| 23 | + - name: Complete Buildx Setup |
| 24 | + run: docker run --privileged --rm tonistiigi/binfmt --install all |
| 25 | + |
| 26 | + - name: Get yarn cache directory path |
| 27 | + id: yarn-cache-dir-path |
| 28 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 29 | + |
| 30 | + - name: Restore node modules from cache |
| 31 | + id: cache-node-modules |
| 32 | + uses: actions/cache@v3 |
| 33 | + with: |
| 34 | + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} |
| 35 | + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
| 36 | + restore-keys: | |
| 37 | + ${{ runner.os }}-yarn- |
| 38 | +
|
| 39 | + - name: Install Serverless Framework |
| 40 | + run: sudo yarn global add serverless --prefix /usr/local |
| 41 | + |
| 42 | + - name: Install dependencies |
| 43 | + working-directory: integration_tests |
| 44 | + run: yarn install |
| 45 | + |
| 46 | + - name: Update Snapshots |
| 47 | + env: |
| 48 | + UPDATE_SNAPSHOTS: true |
| 49 | + BUILD_LAYERS: true |
| 50 | + DD_API_KEY: ${{ secrets.DD_API_KEY }} |
| 51 | + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} |
| 52 | + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| 53 | + run: ./scripts/run_integration_tests.sh |
| 54 | + |
| 55 | + - name: Create Pull Request |
| 56 | + uses: peter-evans/create-pull-request@v3 |
| 57 | + with: |
| 58 | + commit-message: update snapshots |
| 59 | + title: Update Snapshots |
| 60 | + body: | |
| 61 | + Autogenerated PR to update integration test snapshots. Make sure no difference when run in local environment before merging. |
| 62 | + branch: update-snapshots |
0 commit comments