Skip to content

Alexey-Sagaydak run CI #29

Alexey-Sagaydak run CI

Alexey-Sagaydak run CI #29

Workflow file for this run

name: CI
run-name: ${{ github.actor }} run CI
on: [push]
jobs:
build-test:
runs-on: ubuntu-24.04
steps:
- name: Check out repository code
uses: actions/checkout@v3
- run: sudo apt-get update
- run: sudo apt-get install -y g++ make cmake libboost-all-dev libpqxx-dev docker-compose
- name: Set environment variables
run: |
echo "DOCKER_USERNAME=${{ secrets.DOCKER_USERNAME }}" >> .env
echo "GITHUB_SHA=${{ github.sha }}" >> .env
- run: |
cd client && mkdir -p build && cd build && cmake .. && make
cd ../../server && mkdir -p build && cd build && cmake .. && make
- run: cd ../..
- run: sh create_debpkg_client.sh
- name: Upload client artifact
uses: actions/upload-artifact@v4
with:
name: client
path: ./client/http-client.deb
- run: sh create_debpkg_server.sh
- name: Upload server artifact
uses: actions/upload-artifact@v4
with:
name: server
path: ./server/http-server.deb
- name: Test 1. Install client
run: sudo dpkg -i ./client/http-client.deb
- name: Test 2. Test client
run: echo "7" | libhv-client
- name: Start server and database with Docker Compose
run: docker-compose up -d
- name: Stop Docker Compose
run: docker-compose down
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker image
run: docker-compose build http-server
- name: Push Docker image
run: docker push ${{ secrets.DOCKER_USERNAME }}/http-server:${{ github.sha }}