Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal: Run Backend tests #119

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Cache Dependancies
- name: Cache Dependencies
uses: actions/cache@v4
with:
path: |
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
with:
directory: 'dist'
add_suffix: false

- name: Bundle Build Artifacts
run: mkdir oceanchat-${{ github.run_number }} && cp -r ./dist ./oceanchat-${{ github.run_number }}/dist && cp ./target/release-server/ocean-chat ./oceanchat-${{ github.run_number }}/ocean-chat

Expand All @@ -59,3 +59,4 @@ jobs:
with:
path: ./oceanchat-${{ github.run_number }}
name: oceanchat-${{ github.run_number }}

38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
test:
name: Test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Cache Dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-oceanchat-cache-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-oceanchat-cache-

- name: Update Rust
run: rustup update

- name: Run Tests with Server Feature
run: cargo test --features server

Loading