|
| 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: Cache Node modules |
| 20 | + id: cache-node-modules |
| 21 | + uses: actions/cache@v3 |
| 22 | + with: |
| 23 | + path: "**/node_modules" |
| 24 | + key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} |
| 25 | + |
| 26 | + - name: Set up Python |
| 27 | + uses: actions/setup-python@v4 |
| 28 | + with: |
| 29 | + python-version: 3.9 |
| 30 | + |
| 31 | + - name: Install Python dependencies |
| 32 | + run: | |
| 33 | + pip install virtualenv |
| 34 | + virtualenv venv |
| 35 | + source venv/bin/activate |
| 36 | + pip install .[dev] |
| 37 | +
|
| 38 | + - name: Install Serverless Framework |
| 39 | + run: sudo yarn global add serverless@^3.7.0 --prefix /usr/local |
| 40 | + - name: Install Crossbuild Deps |
| 41 | + run: | |
| 42 | + sudo apt-get update --allow-releaseinfo-change --fix-missing |
| 43 | + sudo apt install -y qemu-user-static binfmt-support |
| 44 | +
|
| 45 | + - name: Install dependencies |
| 46 | + if: steps.cache-node-modules.outputs.cache-hit != 'true' |
| 47 | + working-directory: tests/integration |
| 48 | + run: yarn install |
| 49 | + |
| 50 | + - name: Update Snapshots |
| 51 | + env: |
| 52 | + UPDATE_SNAPSHOTS: true |
| 53 | + BUILD_LAYERS: true |
| 54 | + DD_API_KEY: ${{ secrets.DD_API_KEY }} |
| 55 | + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} |
| 56 | + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| 57 | + run: ./scripts/run_integration_tests.sh |
| 58 | + |
| 59 | + - name: Create Pull Request |
| 60 | + uses: peter-evans/create-pull-request@v3 |
| 61 | + with: |
| 62 | + commit-message: update snapshots |
| 63 | + title: Update Snapshots |
| 64 | + body: | |
| 65 | + Autogenerated PR to update integration test snapshots. Make sure no difference when run in local environment before merging. |
| 66 | + branch: update-snapshots |
0 commit comments