-
Notifications
You must be signed in to change notification settings - Fork 13
47 lines (42 loc) · 1.24 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
39
40
41
42
43
44
45
46
47
name: CI
on:
push:
branches:
- master
- actions
pull_request:
branches:
- master
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Postgresql setup adapted from Diesel CI
# Disable ssl as server doesn't have a trusted cert
- name: Setup postgres
run: |
sudo apt-get update
sudo apt-get install -y postgresql
sudo sed -i "s/scram-sha-256/trust/" /etc/postgresql/14/main/pg_hba.conf
sudo cat /etc/postgresql/14/main/pg_hba.conf
sudo service postgresql restart && sleep 3
echo BUTANE_PG_CONNSTR="host=localhost user=postgres sslmode=disable port=5432" >> $GITHUB_ENV
- name: Install Rust tools
run: cargo install typos-cli
- name: Build
run: make build
- name: Lint
run: make lint
- name: Test Core
run: cd butane_core && cargo test --all-features
- name: Test Codegen
run: cd butane_codegen && cargo test --all-features
- name: Test CLI
run: cd butane_cli && cargo test --all-features
- name: Run example cli tests
run: cd example && cargo test --all-features
- name: Test
run: cd butane && cargo test --all-features