persistence/.gitea/workflows/test.yaml
Olga Nemt fd4e93d34a
Some checks failed
Run Tests / run_tests (push) Failing after 42s
Еще одна попытка установить 15 постгресс
2024-12-18 13:52:29 +05:00

53 lines
1.7 KiB
YAML

name: Run Tests
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
run_tests:
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-latest
steps:
- name: Checkout Codebase
uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Check out repository code
uses: actions/checkout@v4
- name: Configure and install postgres
run: |
sudo apt-get install wget ca-certificates
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
service postgresql start
sudo -u postgres -s psql -U postgres -d postgres -c "alter user postgres with password 'postgres'; SELECT version();"
sudo -u postgres -s psql -U postgres -d postgres -c "CREATE DATABASE persistence WITH OWNER 'postgres' ENCODING 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8' TEMPLATE = template0"
sudo locale -a
#
# - uses: pdm-project/setup-pdm@v3
# with:
# python-version: 3.10
# token: ${{ secrets.GH_TOKEN }}
# - name: Install dependencies
# run: cd ${{ gitea.workspace }} && pdm install
- name: Run integration tests
env:
DB_HOST: localhost
DB_USER: postgres
DB_NAME: persistence
DB_PASSWORD: postgres
LANG: ru_RU.UTF-8
run: |
dotnet test DD.Persistence.IntegrationTests