From a9f3786f2bd5ec9987c99817d69e193107a9f080 Mon Sep 17 00:00:00 2001 From: Owczarek Kamil Date: Thu, 11 Apr 2024 23:58:29 +0200 Subject: [PATCH 1/6] Added length limits and constraint for max length --- Database/init-db.sql | 116 +++++++++++++++++++++---------------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/Database/init-db.sql b/Database/init-db.sql index 166c49cb..482e231b 100644 --- a/Database/init-db.sql +++ b/Database/init-db.sql @@ -4,162 +4,162 @@ CREATE SCHEMA common; CREATE TABLE IF NOT EXISTS events.event ( "id" SERIAL PRIMARY KEY, - "name" varchar NOT NULL, + "name" text NOT NULL Constraint events_event_name_maxlength CHECK (LENGTH("name") <= 64), "address_id" integer NOT NULL, - "description" text NOT NULL, + "description" text NOT NULL Constraint events_event_description_maxlength CHECK (LENGTH("description") <= 4048), "organizer_id" integer NOT NULL, "start_at" timestamptz NOT NULL, "end_at" timestamptz NOT NULL, "created_at" timestamptz NOT NULL, "updated_at" timestamptz NOT NULL, - "slug" varchar NOT NULL, + "slug" text NOT NULL Constraint events_event_slug_maxlength CHECK (LENGTH("slug") <= 128), "status_id" integer NOT NULL ); - + CREATE TABLE IF NOT EXISTS events.participant ( "id" SERIAL PRIMARY KEY, "event_id" integer NOT NULL, "user_id" integer NOT NULL, "status_id" integer NOT NULL ); - + CREATE TABLE IF NOT EXISTS common.status ( "id" SERIAL PRIMARY KEY, - "name" varchar(255) NOT NULL, + "name" text NOT NULL Constraint common_status_name_maxlength CHECK (LENGTH("name") <= 32), "object_type_id" integer NOT NULL ); - + CREATE TABLE IF NOT EXISTS events.tag ( "id" SERIAL PRIMARY KEY, - "name" varchar(255) NOT NULL + "name" text NOT NULL Constraint events_tag_name_maxlength CHECK (LENGTH("name") <= 64) ); - + CREATE TABLE IF NOT EXISTS events.event_tag ( "event_id" integer NOT NULL, "tag_id" integer NOT NULL ); - + CREATE TABLE IF NOT EXISTS users.user ( "id" SERIAL PRIMARY KEY, - "name" varchar(255) NOT NULL, - "surname" varchar(255) NOT NULL, - "username" varchar(255) NOT NULL, - "password" varchar(255) NOT NULL, + "name" text NOT NULL Constraint users_user_name_maxlength CHECK (LENGTH(name) <= 64), + "surname" text NOT NULL Constraint users_user_surname_maxlength CHECK (LENGTH("surname") <= 64), + "username" text NOT NULL Constraint users_user_username_maxlength CHECK (LENGTH("username") <= 64), + "password" text NOT NULL, "created_at" timestamptz NOT NULL, "updated_at" timestamptz NOT NULL, "role_id" integer NOT NULL, - "email" varchar(255) NOT NULL, + "email" text NOT NULL Constraint users_user_email_maxlength CHECK (LENGTH("email") <= 255), "is_active" boolean NOT NULL, "address_id" integer NOT NULL, - "phone" varchar(255) + "phone" text Constraint users_user_phone_maxlength CHECK (LENGTH("phone") <= 16) ); - + CREATE TABLE IF NOT EXISTS events.parameter ( "id" SERIAL PRIMARY KEY, - "key" varchar(255) NOT NULL, - "value" varchar(255) NOT NULL + "key" text NOT NULL Constraint events_patameter_key_maxlength CHECK (LENGTH("key") <= 32), + "value" text NOT NULL Constraint events_patameter_value_maxlength CHECK (LENGTH("value") <= 64) ); - + CREATE TABLE IF NOT EXISTS events.event_parameter ( "parameter_id" integer NOT NULL, "event_id" integer NOT NULL ); - + CREATE TABLE IF NOT EXISTS users.role ( "id" SERIAL PRIMARY KEY, - "name" varchar(255) NOT NULL + "name" text NOT NULL CHECK (LENGTH("name") <= 32) ); - + CREATE TABLE IF NOT EXISTS events.comment ( "id" SERIAL PRIMARY KEY, "event_id" integer NOT NULL, - "content" varchar(255) NOT NULL, + "content" text NOT NULL Constraint events_comment_content_maxlength CHECK (LENGTH("content") <= 1024), "created_at" timestamptz NOT NULL, "user_id" integer NOT NULL ); - + CREATE TABLE IF NOT EXISTS common.address ( "id" SERIAL PRIMARY KEY, - "city" varchar(255) NOT NULL, - "country" varchar(255) NOT NULL, - "street" varchar(255) NOT NULL, - "state" varchar(255) NOT NULL, - "zip_code" varchar(255) + "city" text NOT NULL Constraint common_address_city_maxlength CHECK (LENGTH("city") <= 64), + "country" text NOT NULL Constraint common_address_country_maxlength CHECK (LENGTH("country") <= 64), + "street" text NOT NULL Constraint common_address_street_maxlength CHECK (LENGTH("street") <= 64), + "state" text NOT NULL Constraint common_address_state_maxlength CHECK (LENGTH("state") <= 64), + "zip_code" text Constraint common_address_zip_code_maxlength CHECK (LENGTH("zip_code") <= 8) ); - + CREATE TABLE IF NOT EXISTS common.image ( "id" SERIAL PRIMARY KEY, "image_data" bytea NOT NULL, "object_type_id" integer NOT NULL, "object_id" integer NOT NULL ); - + CREATE TABLE IF NOT EXISTS common.object_type ( "id" SERIAL PRIMARY KEY, - "name" varchar(255) NOT NULL + "name" text NOT NULL Constraint common_object_type_name_maxlength CHECK (LENGTH("name") <= 32) ); - + CREATE TABLE IF NOT EXISTS users.user_interest ( "user_id" integer NOT NULL, "interest_id" integer NOT NULL ); - + CREATE TABLE IF NOT EXISTS users.interest ( "id" SERIAL PRIMARY KEY, - "name" varchar(255) NOT NULL, + "name" text NOT NULL Constraint users_interest_name_maxlength CHECK (LENGTH("name") <= 32), "level" integer NOT NULL ); - + ALTER TABLE users.user ADD FOREIGN KEY ("role_id") REFERENCES users.role ("id"); - + ALTER TABLE events.event ADD FOREIGN KEY ("address_id") REFERENCES common.address ("id"); - + ALTER TABLE events.comment ADD FOREIGN KEY ("event_id") REFERENCES events.event ("id"); - + ALTER TABLE events.event ADD FOREIGN KEY ("organizer_id") REFERENCES users.user ("id"); - + ALTER TABLE events.participant ADD FOREIGN KEY ("event_id") REFERENCES events.event ("id"); - + ALTER TABLE events.participant ADD FOREIGN KEY ("user_id") REFERENCES users.user ("id"); - + ALTER TABLE events.comment ADD FOREIGN KEY ("user_id") REFERENCES users.user ("id"); - + ALTER TABLE common.image ADD FOREIGN KEY ("object_type_id") REFERENCES common.object_type ("id"); - + ALTER TABLE users.user_interest ADD FOREIGN KEY ("user_id") REFERENCES users.user ("id"); - + ALTER TABLE users.user ADD FOREIGN KEY ("address_id") REFERENCES common.address ("id"); - + ALTER TABLE events.participant ADD FOREIGN KEY ("status_id") REFERENCES common.status ("id"); - + ALTER TABLE events.event_parameter ADD FOREIGN KEY ("parameter_id") REFERENCES events.parameter ("id"); - + ALTER TABLE events.event_parameter ADD FOREIGN KEY ("event_id") REFERENCES events.event ("id"); - + ALTER TABLE events.event_tag ADD FOREIGN KEY ("tag_id") REFERENCES events.tag ("id"); - + ALTER TABLE events.event_tag ADD FOREIGN KEY ("event_id") REFERENCES events.event ("id"); - + ALTER TABLE common.status ADD FOREIGN KEY ("object_type_id") REFERENCES common.object_type ("id"); - + ALTER TABLE events.event ADD FOREIGN KEY ("status_id") REFERENCES common.status ("id"); - + ALTER TABLE users.user_interest ADD FOREIGN KEY ("interest_id") REFERENCES users.interest ("id"); - + INSERT INTO users.role ("id", "name") VALUES (1, 'Użytkownik'), (2, 'Organizator'), (3, 'Admin'); - + INSERT INTO common.object_type ("id", "name") VALUES (1, 'Wydarzenie'), (2, 'Użytkownik'); - + INSERT INTO common.status ("id", "name", "object_type_id") VALUES (1, 'Zainteresoway', 2), (2, 'Wezmę udział', 2), (3, 'Zrealizowano', 1), (4, 'W trakcie realizacji', 1); - + INSERT INTO events.tag ("id", "name") VALUES (1, 'Technologia'), (2, 'Sport'), From 67e83e1cab3077927b06653fcbac9ea17c7e7db3 Mon Sep 17 00:00:00 2001 From: Owczarek Kamil Date: Wed, 17 Apr 2024 19:53:29 +0200 Subject: [PATCH 2/6] updated init-db and added eol = ef in gitattributes --- .gitattributes.txt | 2 ++ Database/init-db.sql | 40 ++++++++++++++++++++-------------------- 2 files changed, 22 insertions(+), 20 deletions(-) create mode 100644 .gitattributes.txt diff --git a/.gitattributes.txt b/.gitattributes.txt new file mode 100644 index 00000000..3430f589 --- /dev/null +++ b/.gitattributes.txt @@ -0,0 +1,2 @@ +* text=auto eol=lf +*.cs -text \ No newline at end of file diff --git a/Database/init-db.sql b/Database/init-db.sql index 482e231b..1c4b86b9 100644 --- a/Database/init-db.sql +++ b/Database/init-db.sql @@ -4,15 +4,15 @@ CREATE SCHEMA common; CREATE TABLE IF NOT EXISTS events.event ( "id" SERIAL PRIMARY KEY, - "name" text NOT NULL Constraint events_event_name_maxlength CHECK (LENGTH("name") <= 64), + "name" text NOT NULL CONSTRAINT events_event_name_maxlength CHECK (LENGTH("name") <= 64), "address_id" integer NOT NULL, - "description" text NOT NULL Constraint events_event_description_maxlength CHECK (LENGTH("description") <= 4048), + "description" text NOT NULL CONSTRAINT events_event_description_maxlength CHECK (LENGTH("description") <= 4048), "organizer_id" integer NOT NULL, "start_at" timestamptz NOT NULL, "end_at" timestamptz NOT NULL, "created_at" timestamptz NOT NULL, "updated_at" timestamptz NOT NULL, - "slug" text NOT NULL Constraint events_event_slug_maxlength CHECK (LENGTH("slug") <= 128), + "slug" text NOT NULL CONSTRAINT events_event_slug_maxlength CHECK (LENGTH("slug") <= 128), "status_id" integer NOT NULL ); @@ -25,13 +25,13 @@ CREATE TABLE IF NOT EXISTS events.participant ( CREATE TABLE IF NOT EXISTS common.status ( "id" SERIAL PRIMARY KEY, - "name" text NOT NULL Constraint common_status_name_maxlength CHECK (LENGTH("name") <= 32), + "name" text NOT NULL CONSTRAINT common_status_name_maxlength CHECK (LENGTH("name") <= 32), "object_type_id" integer NOT NULL ); CREATE TABLE IF NOT EXISTS events.tag ( "id" SERIAL PRIMARY KEY, - "name" text NOT NULL Constraint events_tag_name_maxlength CHECK (LENGTH("name") <= 64) + "name" text NOT NULL CONSTRAINT events_tag_name_maxlength CHECK (LENGTH("name") <= 64) ); CREATE TABLE IF NOT EXISTS events.event_tag ( @@ -41,23 +41,23 @@ CREATE TABLE IF NOT EXISTS events.event_tag ( CREATE TABLE IF NOT EXISTS users.user ( "id" SERIAL PRIMARY KEY, - "name" text NOT NULL Constraint users_user_name_maxlength CHECK (LENGTH(name) <= 64), - "surname" text NOT NULL Constraint users_user_surname_maxlength CHECK (LENGTH("surname") <= 64), - "username" text NOT NULL Constraint users_user_username_maxlength CHECK (LENGTH("username") <= 64), + "name" text NOT NULL CONSTRAINT users_user_name_maxlength CHECK (LENGTH(name) <= 64), + "surname" text NOT NULL CONSTRAINT users_user_surname_maxlength CHECK (LENGTH("surname") <= 64), + "username" text NOT NULL CONSTRAINT users_user_username_maxlength CHECK (LENGTH("username") <= 64), "password" text NOT NULL, "created_at" timestamptz NOT NULL, "updated_at" timestamptz NOT NULL, "role_id" integer NOT NULL, - "email" text NOT NULL Constraint users_user_email_maxlength CHECK (LENGTH("email") <= 255), + "email" text NOT NULL CONSTRAINT users_user_email_maxlength CHECK (LENGTH("email") <= 255), "is_active" boolean NOT NULL, "address_id" integer NOT NULL, - "phone" text Constraint users_user_phone_maxlength CHECK (LENGTH("phone") <= 16) + "phone" text CONSTRAINT users_user_phone_maxlength CHECK (LENGTH("phone") <= 16) ); CREATE TABLE IF NOT EXISTS events.parameter ( "id" SERIAL PRIMARY KEY, - "key" text NOT NULL Constraint events_patameter_key_maxlength CHECK (LENGTH("key") <= 32), - "value" text NOT NULL Constraint events_patameter_value_maxlength CHECK (LENGTH("value") <= 64) + "key" text NOT NULL CONSTRAINT events_patameter_key_maxlength CHECK (LENGTH("key") <= 32), + "value" text NOT NULL CONSTRAINT events_patameter_value_maxlength CHECK (LENGTH("value") <= 64) ); CREATE TABLE IF NOT EXISTS events.event_parameter ( @@ -73,18 +73,18 @@ CREATE TABLE IF NOT EXISTS users.role ( CREATE TABLE IF NOT EXISTS events.comment ( "id" SERIAL PRIMARY KEY, "event_id" integer NOT NULL, - "content" text NOT NULL Constraint events_comment_content_maxlength CHECK (LENGTH("content") <= 1024), + "content" text NOT NULL CONSTRAINT events_comment_content_maxlength CHECK (LENGTH("content") <= 1024), "created_at" timestamptz NOT NULL, "user_id" integer NOT NULL ); CREATE TABLE IF NOT EXISTS common.address ( "id" SERIAL PRIMARY KEY, - "city" text NOT NULL Constraint common_address_city_maxlength CHECK (LENGTH("city") <= 64), - "country" text NOT NULL Constraint common_address_country_maxlength CHECK (LENGTH("country") <= 64), - "street" text NOT NULL Constraint common_address_street_maxlength CHECK (LENGTH("street") <= 64), - "state" text NOT NULL Constraint common_address_state_maxlength CHECK (LENGTH("state") <= 64), - "zip_code" text Constraint common_address_zip_code_maxlength CHECK (LENGTH("zip_code") <= 8) + "city" text NOT NULL CONSTRAINT common_address_city_maxlength CHECK (LENGTH("city") <= 64), + "country" text NOT NULL CONSTRAINT common_address_country_maxlength CHECK (LENGTH("country") <= 64), + "street" text NOT NULL CONSTRAINT common_address_street_maxlength CHECK (LENGTH("street") <= 64), + "state" text NOT NULL CONSTRAINT common_address_state_maxlength CHECK (LENGTH("state") <= 64), + "zip_code" text CONSTRAINT common_address_zip_code_maxlength CHECK (LENGTH("zip_code") <= 8) ); CREATE TABLE IF NOT EXISTS common.image ( @@ -96,7 +96,7 @@ CREATE TABLE IF NOT EXISTS common.image ( CREATE TABLE IF NOT EXISTS common.object_type ( "id" SERIAL PRIMARY KEY, - "name" text NOT NULL Constraint common_object_type_name_maxlength CHECK (LENGTH("name") <= 32) + "name" text NOT NULL CONSTRAINT common_object_type_name_maxlength CHECK (LENGTH("name") <= 32) ); CREATE TABLE IF NOT EXISTS users.user_interest ( @@ -106,7 +106,7 @@ CREATE TABLE IF NOT EXISTS users.user_interest ( CREATE TABLE IF NOT EXISTS users.interest ( "id" SERIAL PRIMARY KEY, - "name" text NOT NULL Constraint users_interest_name_maxlength CHECK (LENGTH("name") <= 32), + "name" text NOT NULL CONSTRAINT users_interest_name_maxlength CHECK (LENGTH("name") <= 32), "level" integer NOT NULL ); From f5037d99aabd2c4d9e9f5ed1e187e939c78875f2 Mon Sep 17 00:00:00 2001 From: Owczarek Kamil Date: Mon, 29 Apr 2024 20:11:31 +0200 Subject: [PATCH 3/6] Removed comma --- Database/init-db.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Database/init-db.sql b/Database/init-db.sql index 643f4170..60ca9709 100644 --- a/Database/init-db.sql +++ b/Database/init-db.sql @@ -107,7 +107,7 @@ CREATE TABLE IF NOT EXISTS users.user_interest ( CREATE TABLE IF NOT EXISTS users.interest ( "id" SERIAL PRIMARY KEY, - "name" text NOT NULL CONSTRAINT users_interest_name_maxlength CHECK (LENGTH("name") <= 32), + "name" text NOT NULL CONSTRAINT users_interest_name_maxlength CHECK (LENGTH("name") <= 32) ); ALTER TABLE users.user ADD FOREIGN KEY ("role_id") REFERENCES users.role ("id"); From 6cdfd6da15c70529e44418a982fde59c4584b66c Mon Sep 17 00:00:00 2001 From: raczu Date: Tue, 30 Apr 2024 02:48:21 +0200 Subject: [PATCH 4/6] ci: add workflow to verify sql files --- .github/workflows/postgres-tests.yml | 59 ++++++++++++++++++++++++++++ Database/init-users.sh | 27 ++++++------- 2 files changed, 72 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/postgres-tests.yml diff --git a/.github/workflows/postgres-tests.yml b/.github/workflows/postgres-tests.yml new file mode 100644 index 00000000..37e1d67d --- /dev/null +++ b/.github/workflows/postgres-tests.yml @@ -0,0 +1,59 @@ +name: postgres tests + +on: + pull_request: + types: [opened, synchronize, reopened] +env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: reasn + POSTGRES_HOST: localhost + +jobs: + postgres-tests: + runs-on: ubuntu-latest + defaults: + run: + working-directory: Database + services: + postgres: + image: postgres:16 + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 5432:5432 + env: + POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }} + POSTGRES_DB: ${{ env.POSTGRES_DB }} + steps: + - uses: actions/checkout@v4 + + - name: Initialize database + run: | + psql -h ${{ env.POSTGRES_HOST }} -U ${{ env.POSTGRES_USER }} -d ${{ env.POSTGRES_DB }} -f init-db.sql + psql -h ${{ env.POSTGRES_HOST }} -U ${{ env.POSTGRES_USER }} -d ${{ env.POSTGRES_DB }} -f init-constraints.sql + env: + PGPASSWORD: ${{ env.POSTGRES_PASSWORD }} + + - name: Initialize development data + run: | + psql -h ${{ env.POSTGRES_HOST }} -U ${{ env.POSTGRES_USER }} -d ${{ env.POSTGRES_DB }} -f init-dev-data.sql + env: + PGPASSWORD: ${{ env.POSTGRES_PASSWORD }} + + - name: Verify data initialization correctness + run: | + docker logs "${{ job.services.postgres.id }}" 2>&1 | tee "postgres-logs-commit-${{ github.sha }}.log" + if grep -q -i error postgres-logs-commit-${{ github.sha }}.log; then exit 1; fi + + - name: Upload captured logs + uses: actions/upload-artifact@v4 + if: ${{ failure() }} + with: + name: postgres-logs-commit-${{ github.sha }} + path: Database/postgres-logs-commit-${{ github.sha }}.log + retention-days: 14 + \ No newline at end of file diff --git a/Database/init-users.sh b/Database/init-users.sh index 3da9c9e2..3b237d3e 100644 --- a/Database/init-users.sh +++ b/Database/init-users.sh @@ -2,21 +2,20 @@ set -e psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL - - CREATE USER "$POSTGRES_ADMIN_USER" WITH LOGIN PASSWORD '$POSTGRES_ADMIN_PASSWORD'; - GRANT CONNECT ON DATABASE $POSTGRES_DB TO $POSTGRES_ADMIN_USER; - GRANT INSERT, SELECT, UPDATE, DELETE ON ALL TABLES IN SCHEMA events TO $POSTGRES_ADMIN_USER; - GRANT INSERT, SELECT, UPDATE, DELETE ON ALL TABLES IN SCHEMA users TO $POSTGRES_ADMIN_USER; - GRANT INSERT, SELECT, UPDATE, DELETE ON ALL TABLES IN SCHEMA common TO $POSTGRES_ADMIN_USER; - GRANT CREATE ON SCHEMA events TO $POSTGRES_ADMIN_USER; - GRANT CREATE ON SCHEMA users TO $POSTGRES_ADMIN_USER; - GRANT CREATE ON SCHEMA common TO $POSTGRES_ADMIN_USER; - - CREATE USER "$POSTGRES_CLIENT_USER" WITH LOGIN PASSWORD '$POSTGRES_CLIENT_PASSWORD'; + CREATE USER "$POSTGRES_ADMIN_USER" WITH LOGIN PASSWORD '$POSTGRES_ADMIN_PASSWORD'; + GRANT CONNECT ON DATABASE $POSTGRES_DB TO $POSTGRES_ADMIN_USER; + GRANT INSERT, SELECT, UPDATE, DELETE ON ALL TABLES IN SCHEMA events TO $POSTGRES_ADMIN_USER; + GRANT INSERT, SELECT, UPDATE, DELETE ON ALL TABLES IN SCHEMA users TO $POSTGRES_ADMIN_USER; + GRANT INSERT, SELECT, UPDATE, DELETE ON ALL TABLES IN SCHEMA common TO $POSTGRES_ADMIN_USER; + GRANT CREATE ON SCHEMA events TO $POSTGRES_ADMIN_USER; + GRANT CREATE ON SCHEMA users TO $POSTGRES_ADMIN_USER; + GRANT CREATE ON SCHEMA common TO $POSTGRES_ADMIN_USER; + + CREATE USER "$POSTGRES_CLIENT_USER" WITH LOGIN PASSWORD '$POSTGRES_CLIENT_PASSWORD'; GRANT CONNECT ON DATABASE $POSTGRES_DB TO $POSTGRES_CLIENT_USER; GRANT SELECT ON ALL TABLES IN SCHEMA events TO $POSTGRES_CLIENT_USER; - GRANT SELECT ON ALL TABLES IN SCHEMA common TO $POSTGRES_CLIENT_USER; + GRANT SELECT ON ALL TABLES IN SCHEMA common TO $POSTGRES_CLIENT_USER; GRANT SELECT, UPDATE, INSERT, DELETE ON ALL TABLES IN SCHEMA users TO $POSTGRES_CLIENT_USER; - GRANT UPDATE, INSERT ON events.event, events.tag, events.parameter, common.status, common.image TO $POSTGRES_CLIENT_USER; - + GRANT UPDATE, INSERT ON events.event, events.tag, events.parameter, common.status, common.image TO $POSTGRES_CLIENT_USER; + EOSQL From 7f3306fcd3a6112cf1e35203c77d6cfa867099a2 Mon Sep 17 00:00:00 2001 From: raczu Date: Tue, 30 Apr 2024 03:48:47 +0200 Subject: [PATCH 5/6] ci: fix wrong path in artifact upload --- .github/workflows/unit-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index c8ed8f68..327bd242 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} defaults: run: - working-directory: ./Server/ReasnAPI + working-directory: Server/ReasnAPI steps: - uses: actions/checkout@v4 @@ -50,7 +50,7 @@ jobs: if: ${{ failure() }} with: name: dotnet-results-${{ matrix.os }}-commit-${{ github.sha }} - path: TestResults-${{ matrix.os }}-commit-${{ github.sha }} + path: Server/ReasnAPI/TestResults-${{ matrix.os }}-commit-${{ github.sha }} retention-days: 14 client-tests: @@ -60,7 +60,7 @@ jobs: runs-on: ${{ matrix.os }} defaults: run: - working-directory: ./Client/reasn-client + working-directory: Client/reasn-client steps: - uses: actions/checkout@v4 From 351d258557e9f17e810902af7844149f443615c7 Mon Sep 17 00:00:00 2001 From: Owczarek Kamil Date: Tue, 30 Apr 2024 18:03:22 +0200 Subject: [PATCH 6/6] fixed gitattributes --- .gitattributes | 3 ++- .gitattributes.txt | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 .gitattributes.txt diff --git a/.gitattributes b/.gitattributes index dfdb8b77..4b17d136 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ -*.sh text eol=lf +* text=auto eol=lf +*.cs -text \ No newline at end of file diff --git a/.gitattributes.txt b/.gitattributes.txt deleted file mode 100644 index 3430f589..00000000 --- a/.gitattributes.txt +++ /dev/null @@ -1,2 +0,0 @@ -* text=auto eol=lf -*.cs -text \ No newline at end of file