Попытка дать длинное название postgres-сервису
Some checks failed
Unit tests / test (push) Failing after 1m19s
Some checks failed
Unit tests / test (push) Failing after 1m19s
This commit is contained in:
parent
45271df758
commit
7f59304631
@ -1,54 +1,37 @@
|
|||||||
name: Run Tests
|
name: Unit tests
|
||||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
run-name: ${{ gitea.actor }} is testing
|
||||||
on: [push]
|
on: push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run_tests:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: catthehacker/ubuntu:act-latest
|
|
||||||
|
# Service containers to run with `runner-job`
|
||||||
|
services:
|
||||||
|
# Label used to access the service container
|
||||||
|
postgres_test_12345678987654321_qqq_www:
|
||||||
|
# Docker Hub image
|
||||||
|
image: postgres
|
||||||
|
# Provide the password for postgres
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
# Set health checks to wait until postgres has started
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
# Maps tcp port 5432 on service container to the host
|
||||||
|
- 5442:5432
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Codebase
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup dotnet
|
- name: Setup dotnet
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: 8.0.x
|
dotnet-version: 8.0.x
|
||||||
|
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
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 -y install postgresql-15
|
|
||||||
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'"
|
|
||||||
sudo locale -a
|
|
||||||
#ENCODING 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8' TEMPLATE = template0
|
|
||||||
#
|
|
||||||
# - 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
|
- name: Run integration tests
|
||||||
env:
|
run: dotnet test DD.Persistence.IntegrationTests
|
||||||
DB_HOST: localhost
|
|
||||||
DB_USER: postgres
|
|
||||||
DB_NAME: persistence
|
|
||||||
DB_PASSWORD: postgres
|
|
||||||
LANG: ru_RU.UTF-8
|
|
||||||
|
|
||||||
run: |
|
|
||||||
dotnet test DD.Persistence.IntegrationTests
|
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"DbConnection": {
|
"DbConnection": {
|
||||||
"Host": "localhost",
|
"Host": "postgres_test_12345678987654321_qqq_www",
|
||||||
"Port": 5432,
|
"Port": 5432,
|
||||||
"Database": "persistence",
|
"Database": "persistence",
|
||||||
"Username": "postgres",
|
"Username": "postgres",
|
||||||
|
Loading…
Reference in New Issue
Block a user