ci: update ci.yml #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |