forked from jmug/stoatchat
fix(ci): re-order docker-compose arguments
chore(ci): prevent running gen on PR
This commit is contained in:
9
.github/workflows/rust.yaml
vendored
9
.github/workflows/rust.yaml
vendored
@@ -33,32 +33,39 @@ jobs:
|
|||||||
command: test
|
command: test
|
||||||
|
|
||||||
- name: Copy .env.example
|
- name: Copy .env.example
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
|
|
||||||
- name: Run services in background
|
- name: Run services in background
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
docker-compose up -d -f docker-compose.db.yml
|
docker-compose -f docker-compose.db.yml up -d
|
||||||
|
|
||||||
- name: Start API in background
|
- name: Start API in background
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
cargo run --bin revolt-delta &
|
cargo run --bin revolt-delta &
|
||||||
|
|
||||||
- name: Wait for API to go up
|
- name: Wait for API to go up
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
uses: nev7n/wait_for_response@v1
|
uses: nev7n/wait_for_response@v1
|
||||||
with:
|
with:
|
||||||
url: "http://localhost:8000/"
|
url: "http://localhost:8000/"
|
||||||
|
|
||||||
- name: Checkout API repository
|
- name: Checkout API repository
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
repository: revoltchat/api
|
repository: revoltchat/api
|
||||||
path: api
|
path: api
|
||||||
|
|
||||||
- name: Download OpenAPI specification
|
- name: Download OpenAPI specification
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
run: curl http://localhost:8000/openapi.json -o api/OpenAPI.json
|
run: curl http://localhost:8000/openapi.json -o api/OpenAPI.json
|
||||||
|
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
uses: EndBug/add-and-commit@v4
|
uses: EndBug/add-and-commit@v4
|
||||||
with:
|
with:
|
||||||
cwd: "api"
|
cwd: "api"
|
||||||
|
|||||||
Reference in New Issue
Block a user