chore(deps): bump boto3 from 1.35.49 to 1.35.50 #3442
Workflow file for this run
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: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Enable gitlint to check all branch commit messages | |
- name: Get Python version | |
run: echo "PYTHON_VERSION=$(cat .python-version)" >> "$GITHUB_ENV" | |
- name: Use Python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Cache pip | |
uses: actions/cache@v4.1.2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ secrets.CACHE_SEED }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('./poetry.lock') }} | |
restore-keys: ${{ runner.os }}-pip-${{ secrets.CACHE_SEED }}-${{ env.PYTHON_VERSION }}- | |
- name: Upgrade pip | |
run: pip install --upgrade pip | |
- name: Install Poetry | |
run: pip install poetry | |
- name: Install Python dependencies | |
run: poetry install --no-root | |
- name: Lint and format files | |
run: poetry run pre-commit run --all-files | |
- name: Lint commit messages | |
run: poetry run gitlint --commits=origin/${{ github.base_ref }}..${{ github.event.pull_request.head.sha }} --debug --fail-without-commits | |
if: ${{ github.event_name == 'pull_request' }} | |
- name: Coverage | |
run: poetry run pytest --cov src tests/unit tests/integration | |
# Deploy to dev on merge to master | |
deploy-dev: | |
name: deploy-dev | |
if: github.ref == 'refs/heads/master' | |
concurrency: | |
group: ${{ github.workflow }} | |
needs: [build] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Get Python version | |
run: echo "PYTHON_VERSION=$(cat .python-version)" >> "$GITHUB_ENV" | |
- name: Use Python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Cache pip | |
uses: actions/cache@v4.1.2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ secrets.CACHE_SEED }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('./poetry.lock') }} | |
restore-keys: ${{ runner.os }}-pip-${{ secrets.CACHE_SEED }}-${{ env.PYTHON_VERSION }}- | |
- name: Upgrade pip | |
run: pip install --upgrade pip | |
- name: Install Poetry | |
run: pip install poetry | |
- name: Install Python dependencies | |
run: poetry install --no-root | |
- name: Configure AWS Dev Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ap-southeast-2 | |
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME_DEV }} | |
- name: Get Node.js version | |
run: echo "NODE_VERSION=$(cat .nvmrc)" >> "$GITHUB_ENV" | |
- name: Install Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Cache Node.js packages | |
uses: actions/cache@v4.1.2 | |
with: | |
path: ~/.npm | |
key: | |
${{ runner.os }}-node-${{ secrets.CACHE_SEED }}-${{ hashFiles('./package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ secrets.CACHE_SEED }}- | |
- name: install serverless | |
run: npm install | |
- name: deploy app | |
run: npx serverless deploy --stage dev --param=resource-suffix=continuousdeployment | |
- name: get deployment url | |
run: echo BASE_URL=$(npx serverless info --stage dev | grep -o 'https.*\/dev\/') >> "$GITHUB_ENV" | |
- name: Test (sys) | |
run: BASE_URL=${{ env.BASE_URL }} poetry run pytest tests/sys/ | |
# Deploy to prd on tag | |
deploy-prd: | |
name: deploy-prd | |
if: startsWith(github.ref, 'refs/tags/v') | |
concurrency: | |
group: ${{ github.workflow }} | |
needs: [build] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Get Python version | |
run: echo "PYTHON_VERSION=$(cat .python-version)" >> "$GITHUB_ENV" | |
- name: Use Python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Cache pip | |
uses: actions/cache@v4.1.2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ secrets.CACHE_SEED }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('./poetry.lock') }} | |
restore-keys: ${{ runner.os }}-pip-${{ secrets.CACHE_SEED }}-${{ env.PYTHON_VERSION }}- | |
- name: Build project | |
run: | | |
echo ${{ github.repository }} | |
zip -r qgis-plugin-repository.zip . | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1.1.4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
body: | | |
See [CHANGELOG](https://github.com/linz/qgis-plugin-repository/blob/master/CHANGELOG.md) for detailed release information. | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1.0.2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./qgis-plugin-repository.zip | |
asset_name: qgis-plugin-repository | |
asset_content_type: application/zip | |
- name: Configure AWS Prd Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ap-southeast-2 | |
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME_PRD }} | |
- name: Get Node.js version | |
run: echo "NODE_VERSION=$(cat .nvmrc)" >> "$GITHUB_ENV" | |
- name: Install Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Cache Node.js packages | |
uses: actions/cache@v4.1.2 | |
with: | |
path: ~/.npm | |
key: | |
${{ runner.os }}-node-${{ secrets.CACHE_SEED }}-${{ hashFiles('./package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ secrets.CACHE_SEED }}- | |
- name: install serverless | |
run: npm install | |
- name: deploy app | |
run: npx serverless deploy --stage dev --param=resource-suffix=56c159c6dfdsw2378fec41dfd |