-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (45 loc) · 1.34 KB
/
valve-tests.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
name: Valve Tests
on:
pull_request:
types:
- ready_for_review
push:
branches:
- '*'
env:
CARGO_TERM_COLOR: always
jobs:
run-tests:
runs-on: ubuntu-20.04
steps:
- name: Install postgresql server and client
run: |
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib postgresql-client build-essential
sudo mkdir /opt/sqlite3
wget https://www.sqlite.org/2023/sqlite-autoconf-3430000.tar.gz
tar xvfz sqlite-autoconf-3430000.tar.gz
sudo mv sqlite-autoconf-3430000 /opt/sqlite3
cd /opt/sqlite3/sqlite-autoconf-3430000
./configure
make -j 2
sudo make install
- name: Start the database server
run: |
sudo systemctl start postgresql.service
- name: Create the valve_postgres database
run: |
sudo su - postgres -c "createuser runner"
sudo su - postgres -c "createdb -O runner valve_postgres"
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Check out repository code
uses: actions/checkout@v3
- name: Install psycopg2
run: |
pip3 install -r requirements.txt
- name: Run tests on both sqlite and on postgresql
run: |
make test