-
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (60 loc) · 1.94 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
name: Test
on: [ push, pull_request ]
jobs:
sqlite:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install SQLite, git
run: |
sudo apt-get install -y git sqlite3
shell: bash
- name: Checkout MalwareDB
run: |
git clone https://github.com/malwaredb/malwaredb-rs.git
- name: Create database
run: |
sqlite3 test.db < malwaredb-rs/crates/server/src/db/malwaredb_sqlite.sql
- name: Load sources
run: |
sqlite3 test.db < sources/VirusShare/VirusShare.sql
for src in `ls sources/VirusShare/*.zip.sql`
do
sqlite3 test.db < $src
done
ls -la test.db
postgres:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: whatever1
POSTGRES_DB: testdb
POSTGRES_USER: postgres
ports:
- 5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Install git
run: |
sudo apt-get install -y git
shell: bash
- name: Checkout MalwareDB
run: |
git clone https://github.com/malwaredb/malwaredb-rs.git
- name: Create database
run: |
PGPASSWORD=whatever1 psql -U postgres -h 127.0.0.1 -p ${{ job.services.postgres.ports[5432] }} -d testdb -f malwaredb-rs/crates/server/src/db/malwaredb_pg.sql
- name: Load sources
run: |
PGPASSWORD=whatever1 psql -U postgres -h 127.0.0.1 -p ${{ job.services.postgres.ports[5432] }} -d testdb -f sources/VirusShare/VirusShare.sql
for src in `ls sources/VirusShare/*.zip.sql`
do
PGPASSWORD=whatever1 psql -U postgres -h 127.0.0.1 -p ${{ job.services.postgres.ports[5432] }} -d testdb -f $src
done