Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Tests #719

Merged
merged 18 commits into from
Oct 6, 2023
Merged

Tests #719

Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches: [master]
pull_request:
branches:
- master

env:
CARGO_TERM_COLOR: always
Expand All @@ -21,23 +23,34 @@ jobs:

steps:
- uses: actions/checkout@v2

# Start Docker Compose
- name: Start Docker Compose
run: docker-compose up -d

- uses: actions-rs/toolchain@v1
name: Install toolchain
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Cache build artifacts
id: cache-build

# Cache dependencies and build artifacts
- name: Cache build artifacts and dependencies
uses: actions/cache@v2
with:
path: target/**
key: ${{ runner.os }}-build-cache-${{ matrix.rust }}
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- uses: actions-rs/cargo@v1
with:
command: build
env:
SQLX_OFFLINE: true

- uses: actions-rs/cargo@v1
with:
command: test
Expand All @@ -50,4 +63,5 @@ jobs:
S3_URL: ${{ secrets.S3_URL }}
S3_REGION: ${{ secrets.S3_REGION }}
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }}
SQLX_OFFLINE: true
SQLX_OFFLINE: true
DATABASE_URL: postgresql://labrinth:labrinth@localhost/postgres
13 changes: 7 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ actix-multipart = "0.6.0"
actix-cors = "0.6.4"
actix-ws = "0.2.5"
actix-files = "0.6.2"
actix-http = "3.4.0"
thesuzerain marked this conversation as resolved.
Show resolved Hide resolved

tokio = { version = "1.29.1", features = ["sync"] }
tokio-stream = "0.1.14"
Expand Down
68 changes: 34 additions & 34 deletions sqlx-data.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
{
"db": "PostgreSQL",
"009bce5eee6ed65d9dc0899a4e24da528507a3f00b7ec997fa9ccdd7599655b1": {
"describe": {
"columns": [
{
"name": "id",
"ordinal": 0,
"type_info": "Int8"
}
],
"nullable": [
false
],
"parameters": {
"Left": [
"Int8",
"Text"
]
}
},
"query": "\n SELECT m.id FROM organizations o\n INNER JOIN mods m ON m.organization_id = o.id\n WHERE (o.id = $1 AND $1 IS NOT NULL) OR (o.title = $2 AND $2 IS NOT NULL)\n "
},
"010cafcafb6adc25b00e3c81d844736b0245e752a90334c58209d8a02536c800": {
"describe": {
"columns": [],
Expand Down Expand Up @@ -3669,6 +3690,19 @@
},
"query": "\n SELECT n.id FROM notifications n\n WHERE n.user_id = $1\n "
},
"7b6b76f383adcbe2afbd2a2e87e66fd2a0d9d05b68b27823c1395e7cc3b8c0a2": {
"describe": {
"columns": [],
"nullable": [],
"parameters": {
"Left": [
"Varchar",
"Int8"
]
}
},
"query": "\n UPDATE collections\n SET status = $1\n WHERE (id = $2)\n "
},
"7c0cdacf0898155c94008a96a0b918550df4475b9e3362a926d4d00e001880c1": {
"describe": {
"columns": [
Expand Down Expand Up @@ -3821,19 +3855,6 @@
},
"query": "\n SELECT name FROM side_types\n "
},
"86049f204c9eda5241403d22b5f8ffe13b258ddfffb81a1a9ee8602e21c64723": {
"describe": {
"columns": [],
"nullable": [],
"parameters": {
"Left": [
"Varchar",
"Int8"
]
}
},
"query": "\n UPDATE collections\n SET status = $1\n WHERE (id = $2)\n "
},
"868ee76d507cc9e94cd3c2e44770faff127e2b3c5f49b8100a9a37ac4d7b1f1d": {
"describe": {
"columns": [],
Expand Down Expand Up @@ -6131,27 +6152,6 @@
},
"query": "\n UPDATE versions\n SET featured = $1\n WHERE (id = $2)\n "
},
"e60561aeefbc2bed1f77ff4bbca763b5be84bd6bc3eff75ca57e3590be286d45": {
"describe": {
"columns": [
{
"name": "id",
"ordinal": 0,
"type_info": "Int8"
}
],
"nullable": [
false
],
"parameters": {
"Left": [
"Int8",
"Text"
]
}
},
"query": "\n SELECT m.id FROM organizations o\n LEFT JOIN mods m ON m.id = o.id\n WHERE (o.id = $1 AND $1 IS NOT NULL) OR (o.title = $2 AND $2 IS NOT NULL)\n "
},
"e60ea75112db37d3e73812e21b1907716e4762e06aa883af878e3be82e3f87d3": {
"describe": {
"columns": [
Expand Down
Loading
Loading