Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

chore(deps): update actions/upload-artifact action to v4 #211

chore(deps): update actions/upload-artifact action to v4

chore(deps): update actions/upload-artifact action to v4 #211

name: Quality checks πŸ‘ŒπŸ§ͺ
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
pull_request:
paths-ignore:
- "**/*.md"
workflow_dispatch:
jobs:
dependency-review:
name: Vulnerable dependencies πŸ”Ž
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4.1.1
with:
show-progress: false
- name: Scan
uses: actions/dependency-review-action@v3.1.4
lint_frontend:
name: Lint (frontend) πŸ”¬
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- name: Checkout ⬇️
uses: actions/checkout@v4.1.1
with:
show-progress: false
- name: Setup node environment βš™οΈ
uses: actions/setup-node@v4.0.0
with:
node-version: 20
check-latest: true
- name: Install dependencies πŸ“¦
run: npm ci --no-audit
- name: Run linter ✏️
run: npm run lint
typecheck_frontend:
name: Typecheck (frontend) 🈯
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- name: Checkout ⬇️
uses: actions/checkout@v4.1.1
with:
show-progress: false
- name: Setup node environment βš™οΈ
uses: actions/setup-node@v4.0.0
with:
node-version: 20
check-latest: true
- name: Install dependencies πŸ“¦
run: npm ci --no-audit
- name: Run typecheck πŸ“–
run: npm run typecheck
build_frontend:
name: Build (frontend) πŸ—οΈ
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- name: Checkout ⬇️
uses: actions/checkout@v4.1.1
with:
show-progress: false
- name: Setup node environment βš™οΈ
uses: actions/setup-node@v4.0.0
with:
node-version: 20
check-latest: true
- name: Install dependencies πŸ“¦
run: npm ci --no-audit
- name: Run build βš’οΈ
run: npm run build
conventional_commits:
name: Conventional commits check πŸ’¬
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- name: Checkout ⬇️
uses: actions/checkout@v4.1.1
with:
show-progress: false
- name: Check if all commits comply with the specification
uses: webiny/action-conventional-commits@v1.2.0
run_backend:
name: Run backend πŸƒβ€β™‚οΈ
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
steps:
- name: Checkout ⬇️
uses: actions/checkout@v4.1.1
with:
show-progress: false
- name: Setup Python 🐍
uses: actions/setup-python@v5.0.0
with:
python-version: '3.x'
check-latest: true
- name: Install dependencies πŸ“¦
run: pip install -r requirements.txt
- name: Perform migrations πŸ—ƒοΈ
run: python ./manage.py migrate
- name: Run Django Server πŸƒβ€β™‚οΈ
run: |
python manage.py runserver &
sleep 10 # Espera a que el servidor estΓ© listo
- name: Check server 🩺
run: |
curl -I http://127.0.0.1:8000/
sudo pkill python
test_backend:
name: Test backend πŸ”
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
steps:
- name: Checkout ⬇️
uses: actions/checkout@v4.1.1
with:
show-progress: false
- name: Setup Python 🐍
uses: actions/setup-python@v5.0.0
with:
python-version: '3.x'
check-latest: true
- name: Install dependencies πŸ“¦
run: pip install -r requirements.txt
- name: Perform tests βš’οΈ
run: python ./manage.py test
build:
name: Build Docker image πŸ“¦
runs-on: ubuntu-latest
steps:
- name: Checkout ⬇️
uses: actions/checkout@v4.1.1
with:
show-progress: false
- name: Configure QEMU βš™οΈ
uses: docker/setup-qemu-action@v3.0.0
- name: Configure Docker Buildx βš™οΈ
uses: docker/setup-buildx-action@v3.0.0
- name: Build Docker images πŸ› οΈ
uses: docker/build-push-action@v5.1.0
with:
context: .
file: Dockerfile
platforms: linux/amd64
load: true
tags: |
traineerbook
- name: Extract Docker image for artifact publishing πŸ“¦
run: |
docker save traineerbook > docker_image.tar.gz
- name: Upload artifact (Docker image) β¬†οΈπŸ“¦
uses: actions/upload-artifact@v4.0.0
with:
name: docker_image
path: |
docker_image.tar.gz