Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit bcdd52c

Browse files
authored
switch GitHub Actions
1 parent 7409890 commit bcdd52c

File tree

2 files changed

+54
-16
lines changed

2 files changed

+54
-16
lines changed

.github/workflows/test.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
formatting:
11+
name: cargo fmt
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
# Ensure rustfmt is installed and setup problem matcher
16+
- uses: actions-rust-lang/setup-rust-toolchain@v1
17+
with:
18+
components: rustfmt
19+
- name: Rustfmt Check
20+
uses: actions-rust-lang/rustfmt@v1
21+
22+
test:
23+
name: tests
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: actions-rust-lang/setup-rust-toolchain@v1
28+
- run: ./tests/run.sh
29+
env:
30+
PGQL_DB_HOST: 127.0.0.1
31+
PGQL_DB_USER: postgres
32+
PGQL_DB_PASSWORD: postgres
33+
PGQL_DB_NAME: travis_ci_test
34+
services:
35+
postgres:
36+
image: postgres:12
37+
env:
38+
env:
39+
POSTGRES_DB: postgres
40+
POSTGRES_PASSWORD: postgres
41+
POSTGRES_USER: postgres
42+
options: >-
43+
--health-cmd pg_isready
44+
--health-interval 10s
45+
--health-timeout 5s
46+
--health-retries 5
47+
48+
clippy:
49+
name: cargo clippy
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v4
53+
- uses: actions-rust-lang/setup-rust-toolchain@v1
54+
- run: cargo clippy

.travis.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)