-
-
Notifications
You must be signed in to change notification settings - Fork 20
71 lines (60 loc) · 1.89 KB
/
test.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Push
on: [push, pull_request]
jobs:
test:
name: Run tests on Ubuntu
runs-on: ubuntu-latest
# Database services used for testing
services:
# Microsoft SQL Server
sqlserver:
image: mcr.microsoft.com/mssql/server:2019-latest
ports:
- 1433:1433
env:
ACCEPT_EULA: Y
SA_PASSWORD: My@Test@Password1
postgres:
image: postgres:13
ports:
- "5432:5432"
env:
POSTGRES_DB: test
POSTGRES_USER: test
POSTGRES_PASSWORD: test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install latest rust toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
- name: Install PostgreSQL Driver
run: |
sudo apt-get update
sudo apt-get install -y unixodbc-dev odbc-postgresql devscripts
# Fix PostgreSQL driver paths
sed --in-place 's/psqlodbca.so/\/usr\/lib\/x86_64-linux-gnu\/odbc\/psqlodbca.so/' /etc/odbcinst.ini
sed --in-place 's/psqlodbcw.so/\/usr\/lib\/x86_64-linux-gnu\/odbc\/psqlodbcw.so/' /etc/odbcinst.ini
shell: sudo bash {0}
- name: Print odbcinst.ini
run: cat /etc/odbcinst.ini
- name: Test
run: |
# Parquet tooling is used to verify output of this tool in tests
cargo install parquet --features cli
# Run test suite
cargo test
dependabot:
needs: [test]
permissions:
pull-requests: write
contents: write
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}}
steps:
- name: Merge Dependabot Pull Request
run: gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}