diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3843ea88..6a280515 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,6 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - - name: Install dependencies run: yarn install @@ -67,7 +66,6 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - - name: Install NodeGYP if: matrix.node-version == '20.9' run: yarn global add node-gyp @@ -83,70 +81,3 @@ jobs: - name: Upload code coverage report run: bash <(curl -s https://codecov.io/bash) - - integration-test: - runs-on: ubuntu-latest - strategy: - matrix: - runtime-param: [14, 16, 18, 20] - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up Node 14 - uses: actions/setup-node@v3 - with: - node-version: 14 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Complete Buildx Setup - run: docker run --privileged --rm tonistiigi/binfmt --install all - - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - - name: Restore node modules from cache - id: cache-node-modules - uses: actions/cache@v3 - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - name: Install Serverless Framework - run: sudo yarn global add serverless --prefix /usr/local - - - name: Install dependencies - working-directory: integration_tests - run: yarn install - - - name: Run tests - env: - BUILD_LAYERS: true - DD_API_KEY: ${{ secrets.DD_API_KEY }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - RUNTIME_PARAM: ${{ matrix.runtime-param }} - run: ./scripts/run_integration_tests.sh - - - name: Send success metric - env: - DD_API_KEY: ${{ secrets.DD_API_KEY }} - run: ./scripts/send_status_metric.sh 0 $DD_API_KEY - - integration-test-failure: - runs-on: ubuntu-latest - needs: [integration-test] - if: always() && (needs.integration-test.result == 'failure') - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Send a failure metric - env: - DD_API_KEY: ${{ secrets.DD_API_KEY }} - run: ./scripts/send_status_metric.sh 1 $DD_API_KEY diff --git a/.github/workflows/check-size.yml b/.github/workflows/check-size.yml deleted file mode 100644 index 5d12b70a..00000000 --- a/.github/workflows/check-size.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: check-size - -on: pull_request - -jobs: - check-size: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [14.15, 16.14, 18.12, 20.9] - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up Node 14.15 - uses: actions/setup-node@v3 - with: - node-version: 14.15 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Complete Buildx Setup - run: docker run --privileged --rm tonistiigi/binfmt --install all - - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - - name: Restore node modules from cache - id: cache-node-modules - uses: actions/cache@v2 - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - name: Install dependencies - run: yarn install - - - name: Build Layers - env: - NODE_VERSION: ${{ matrix.node-version }} - run: ./scripts/build_layers.sh - - - name: Check Size - env: - NODE_VERSION: ${{ matrix.node-version }} - run: ./scripts/check_layer_size.sh diff --git a/scripts/send_status_metric.sh b/scripts/send_status_metric.sh deleted file mode 100755 index c3af8028..00000000 --- a/scripts/send_status_metric.sh +++ /dev/null @@ -1,29 +0,0 @@ -if [ -z $GITHUB_REF ]; then - echo "GITHUB_REF is not set, not sending the metric" - exit 0 -fi - -if [ "$GITHUB_REF" != "refs/heads/main" ]; then - echo "Not on the main branch, not sending the metric" - exit 0 -fi - -#Retrieve the status -# 0 means success -# 1 means failure -STATUS=$1 - -API_KEY=$2 -CURRENT_TIME=$(date +%s) - -#Send the metric -curl -H "Content-type: application/json" \ --H "DD-API-KEY: ${API_KEY}" \ --d "{ \"series\" : - [{\"metric\":\"serverless.integration_test.nodejs.status\", - \"points\":[[$CURRENT_TIME, $STATUS]], - \"type\":\"gauge\", - \"tags\":[\"service:serverless-integration-test\"]} - ] - }" \ -'https://app.datadoghq.com/api/v1/series' \ No newline at end of file