chore(deps): bump aiohttp from 3.8.5 to 3.9.0 #41
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: CI/CD | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
ci-cd: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
poetry install | |
npm ci | |
- name: Lint with flake8 | |
run: | | |
poetry run flake8 chatiq | |
- name: Check code formatting | |
run: | | |
poetry run black --check chatiq | |
- name: Check imports with isort | |
run: | | |
poetry run isort chatiq --check --diff | |
- name: Run Pytype | |
run: | | |
poetry run pytype chatiq | |
- name: Run unit tests and measure code coverage | |
run: | | |
poetry run coverage run -m pytest | |
poetry run coverage xml | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
- id: semantic-release | |
name: Run semantic-release | |
run: | | |
npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish package | |
run: poetry publish --build -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} | |
if: ${{ steps.semantic-release.outputs.nextVer != null }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
if: ${{ steps.semantic-release.outputs.nextVer != null }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
if: ${{ steps.semantic-release.outputs.nextVer != null }} | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
if: ${{ steps.semantic-release.outputs.nextVer != null }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
yujiosaka/chatiq:${{ steps.semantic-release.outputs.nextVer }} | |
yujiosaka/chatiq:latest | |
if: ${{ steps.semantic-release.outputs.nextVer != null }} |