42 lines
1.5 KiB
YAML
42 lines
1.5 KiB
YAML
name: Dev testing pipeline
|
|
run-name: ${{ gitea.actor }} is testing out Yuna 🚀
|
|
on:
|
|
push:
|
|
branches:
|
|
- dev
|
|
jobs:
|
|
BuildAndTest:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: catthehacker/ubuntu:act-22.04
|
|
steps:
|
|
- name: List Base info 👓
|
|
run: |
|
|
echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
|
echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
|
echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
|
echo "${{ gitea.workspace }} is a workspace folder"
|
|
- name: Check out repo code 📝
|
|
uses: actions/checkout@v4
|
|
- name: Set up PostgreSQL 🐘
|
|
run: |
|
|
sudo apt-get install -y postgresql
|
|
- name: Create User
|
|
run: |
|
|
sudo -u postgres psql --command="CREATE USER developer PASSWORD 'magazinchik_forever'"
|
|
- name: Init db 📜
|
|
env:
|
|
PGPASSWORD: magazinchik_forever
|
|
run: |
|
|
sudo psql -h localhost -U developer -f ${{ gitea.workspace }}/Db/_localhost-2024_07_27_12_51_02-dump.sql
|
|
- name: Setup .NET 🛠️
|
|
uses: actions/setup-dotnet@v3
|
|
with:
|
|
dotnet-version: "8.0.x"
|
|
- name: Restore dependencies 🔪
|
|
run: dotnet restore
|
|
- name: Build debug app ☢️
|
|
run: dotnet build -c Debug --no-restore
|
|
- name: Run unit tests 💊
|
|
run: dotnet test -c Debug --no-build
|