Skip to content

Commit

Permalink
merge: branch 'refactor/split-project-into-core-crates'
Browse files Browse the repository at this point in the history
  • Loading branch information
insertish committed Apr 22, 2023
2 parents 7f86337 + 22bfd72 commit bcc2d05
Show file tree
Hide file tree
Showing 56 changed files with 1,624 additions and 272 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Rust build, test, and generate specification

on:
push:
branches: [master]
pull_request:
branches: [master]

Expand All @@ -27,46 +26,52 @@ jobs:
with:
command: build

- name: Run services in background
run: |
docker-compose -f docker-compose.db.yml up -d
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test

- name: Run cargo test (with MongoDB)
uses: actions-rs/cargo@v1
env:
MONGODB: mongodb://localhost
with:
command: test

- name: Copy .env.example
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && github.ref_name == 'master'
run: |
cp .env.example .env
- name: Run services in background
if: github.event_name != 'pull_request'
run: |
docker-compose -f docker-compose.db.yml up -d
- name: Start API in background
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && github.ref_name == 'master'
run: |
cargo run --bin revolt-delta &
- name: Wait for API to go up
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && github.ref_name == 'master'
uses: nev7n/wait_for_response@v1
with:
url: "http://localhost:8000/"

- name: Checkout API repository
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && github.ref_name == 'master'
uses: actions/checkout@v3
with:
repository: revoltchat/api
path: api
token: ${{ secrets.PAT }}

- name: Download OpenAPI specification
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && github.ref_name == 'master'
run: curl http://localhost:8000/openapi.json -o api/OpenAPI.json

- name: Commit changes
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && github.ref_name == 'master'
uses: EndBug/add-and-commit@v4
with:
cwd: "api"
Expand Down
Loading

0 comments on commit bcc2d05

Please sign in to comment.