Skip to content

Make Discount a struct to resemble class in C++. #18

Make Discount a struct to resemble class in C++.

Make Discount a struct to resemble class in C++. #18

Workflow file for this run

name: Test C
on:
push:
paths:
- 'C/**'
- '.github/workflows/C.yml'
pull_request:
paths:
- 'C/**'
- '.github/workflows/C.yml'
jobs:
build:
runs-on: ubuntu-latest
env:
DB_USER: root
DB_OLD_PASSWORD: root
DB_PASSWORD: mysql
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Start MYSQL and import DB
run: |
sudo systemctl start mysql
mysqladmin --user=${{ env.DB_USER }} --password=${{ env.DB_OLD_PASSWORD }} password ${{ env.DB_PASSWORD }}
mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} < ${GITHUB_WORKSPACE}/build/Database/initDatabase.sql
- name: Set up dependencies
working-directory: C
run: |
sudo apt-get update
sudo apt-get install libcmocka-dev
sudo apt-get install libmysqlclient-dev
- name: Build
working-directory: C
run: make build
- name: Test
working-directory: C
run: |
rm tests/e/CheckoutTest.c
make test
mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} -e "select * from myShop.RECEIPT"