Merge pull request #9 from davi-lucciola/dev #12
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: Continuos Integration - CI | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# API - Build | |
- name: Using Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install Dependencies | |
run: | | |
cd server | |
pip install --upgrade pip | |
pip install --no-cache-dir poetry | |
poetry config virtualenvs.create false | |
poetry install | |
# API - Tests | |
- name: Running Tests | |
run: | | |
cd server | |
poetry run pytest | |
env: | |
TOKEN_SECRET: testkey | |
# Web - Build | |
- name: Using NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.8.0" | |
- name: Building NextJS | |
run: | | |
cd client | |
npm install | |
npm run build | |
# Web - Tests | |
# Work In Progress | |
# Login Dockerhub | |
# - name: Login Dockerhub | |
# env: | |
# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
# run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | |
# # API - Docker Image | |
# - name: Build API Docker Image | |
# run: | | |
# cd server | |
# docker build . -t davilucciola/knockbank-api | |
# - name: Push API Docker Image | |
# run: docker push davilucciola/knockbank-api:latest | |
# Web - Docker Image | |
# - name: Build Web Docker Image | |
# run: | | |
# cd client | |
# docker build . -t davilucciola/knockbank-web | |
# - name: Push Web Docker Image | |
# run: docker push davilucciola/knockbank-web:latest |