Bump version to 4.81.0 #1043
This file contains 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: build | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
pip install virtualenv | |
virtualenv venv | |
source venv/bin/activate | |
pip install .[dev] | |
- name: Check formatting | |
run: | | |
source venv/bin/activate | |
./scripts/check_format.sh | |
- name: Lint | |
run: | | |
source venv/bin/activate | |
flake8 datadog_lambda/ | |
unit-test: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install virtualenv | |
virtualenv venv | |
source venv/bin/activate | |
pip install .[dev] | |
- name: Run tests | |
run: | | |
source venv/bin/activate | |
nose2 -v | |
integration-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
runtime-param: ['3.7', '3.8', '3.9', '3.10', '3.11'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Node 14 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 14 | |
- name: Cache Node modules | |
id: cache-node-modules | |
uses: actions/cache@v3 | |
with: | |
path: "**/node_modules" | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install Python dependencies | |
run: | | |
pip install virtualenv | |
virtualenv venv | |
source venv/bin/activate | |
pip install .[dev] | |
- name: Install Serverless Framework | |
run: sudo yarn global add serverless@^3.7.0 --prefix /usr/local | |
- name: Install Crossbuild Deps | |
run: | | |
sudo apt-get update --allow-releaseinfo-change --fix-missing | |
sudo apt install -y qemu-user-static binfmt-support | |
- name: Install dependencies | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
working-directory: tests/integration | |
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 |