-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (38 loc) · 1.17 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: ci
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup FluentCI
uses: fluentci-io/setup-fluentci@v5
with:
wasm: true
plugin: rust
args: setup
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run tests
run: |
fluentci run --wasm postgres start
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo-binstall sqlx-cli -y
sqlx migrate run
cargo sqlx prepare
cargo test
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NIX_CONFIG: "extra-access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}"
POSTGRES_USER: postgres
POSTGRES_DB: demo
DATABASE_URL: postgres://postgres@localhost/demo
- name: Run build
run: |
fluentci run --wasm rust build
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DATABASE_URL: postgres://postgres@localhost/demo