Fetch Test #759
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Fetch Test | |
on: | |
pull_request: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
fetch-nvd: | |
name: fetch-nvd | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql | |
ports: | |
- 3306:3306 | |
env: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: test | |
options: >- | |
--health-cmd "mysqladmin ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
postgres: | |
image: postgres | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_PASSWORD: password | |
POSTGRES_DB: test | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: go.mod | |
- name: build | |
id: build | |
run: make build | |
- name: fetch sqlite3 | |
if: ${{ steps.build.conclusion == 'success' && ( success() || failure() )}} | |
run: ./go-cve-dictionary fetch --dbtype sqlite3 nvd | |
- name: fetch mysql | |
if: ${{ steps.build.conclusion == 'success' && ( success() || failure() )}} | |
run: ./go-cve-dictionary fetch --dbtype mysql --dbpath "root:password@tcp(127.0.0.1:3306)/test?parseTime=true" nvd | |
- name: fetch postgres | |
if: ${{ steps.build.conclusion == 'success' && ( success() || failure() )}} | |
run: ./go-cve-dictionary fetch --dbtype postgres --dbpath "host=127.0.0.1 user=postgres dbname=test sslmode=disable password=password" nvd | |
- name: fetch redis | |
if: ${{ steps.build.conclusion == 'success' && ( success() || failure() )}} | |
run: ./go-cve-dictionary fetch --dbtype redis --dbpath "redis://127.0.0.1:6379/0" nvd | |
fetch-jvn: | |
name: fetch-jvn | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql | |
ports: | |
- 3306:3306 | |
env: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: test | |
options: >- | |
--health-cmd "mysqladmin ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
postgres: | |
image: postgres | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_PASSWORD: password | |
POSTGRES_DB: test | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: go.mod | |
- name: build | |
id: build | |
run: make build | |
- name: fetch sqlite3 | |
if: ${{ steps.build.conclusion == 'success' && ( success() || failure() )}} | |
run: ./go-cve-dictionary fetch --dbtype sqlite3 jvn | |
- name: fetch mysql | |
if: ${{ steps.build.conclusion == 'success' && ( success() || failure() )}} | |
run: ./go-cve-dictionary fetch --dbtype mysql --dbpath "root:password@tcp(127.0.0.1:3306)/test?parseTime=true" jvn | |
- name: fetch postgres | |
if: ${{ steps.build.conclusion == 'success' && ( success() || failure() )}} | |
run: ./go-cve-dictionary fetch --dbtype postgres --dbpath "host=127.0.0.1 user=postgres dbname=test sslmode=disable password=password" jvn | |
- name: fetch redis | |
if: ${{ steps.build.conclusion == 'success' && ( success() || failure() )}} | |
run: ./go-cve-dictionary fetch --dbtype redis --dbpath "redis://127.0.0.1:6379/0" jvn | |
fetch-fortinet: | |
name: fetch-fortinet | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql | |
ports: | |
- 3306:3306 | |
env: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: test | |
options: >- | |
--health-cmd "mysqladmin ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
postgres: | |
image: postgres | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_PASSWORD: password | |
POSTGRES_DB: test | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: go.mod | |
- name: build | |
id: build | |
run: make build | |
- name: fetch sqlite3 | |
if: ${{ steps.build.conclusion == 'success' && ( success() || failure() )}} | |
run: ./go-cve-dictionary fetch --dbtype sqlite3 fortinet | |
- name: fetch mysql | |
if: ${{ steps.build.conclusion == 'success' && ( success() || failure() )}} | |
run: ./go-cve-dictionary fetch --dbtype mysql --dbpath "root:password@tcp(127.0.0.1:3306)/test?parseTime=true" fortinet | |
- name: fetch postgres | |
if: ${{ steps.build.conclusion == 'success' && ( success() || failure() )}} | |
run: ./go-cve-dictionary fetch --dbtype postgres --dbpath "host=127.0.0.1 user=postgres dbname=test sslmode=disable password=password" fortinet | |
- name: fetch redis | |
if: ${{ steps.build.conclusion == 'success' && ( success() || failure() )}} | |
run: ./go-cve-dictionary fetch --dbtype redis --dbpath "redis://127.0.0.1:6379/0" fortinet | |
fetch-mitre: | |
name: fetch-mitre | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql | |
ports: | |
- 3306:3306 | |
env: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: test | |
options: >- | |
--health-cmd "mysqladmin ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
postgres: | |
image: postgres | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_PASSWORD: password | |
POSTGRES_DB: test | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: go.mod | |
- name: build | |
id: build | |
run: make build | |
- name: fetch sqlite3 | |
if: ${{ steps.build.conclusion == 'success' && ( success() || failure() )}} | |
run: ./go-cve-dictionary fetch --dbtype sqlite3 mitre | |
- name: fetch mysql | |
if: ${{ steps.build.conclusion == 'success' && ( success() || failure() )}} | |
run: ./go-cve-dictionary fetch --dbtype mysql --dbpath "root:password@tcp(127.0.0.1:3306)/test?parseTime=true" mitre | |
- name: fetch postgres | |
if: ${{ steps.build.conclusion == 'success' && ( success() || failure() )}} | |
run: ./go-cve-dictionary fetch --dbtype postgres --dbpath "host=127.0.0.1 user=postgres dbname=test sslmode=disable password=password" mitre | |
- name: fetch redis | |
if: ${{ steps.build.conclusion == 'success' && ( success() || failure() )}} | |
run: ./go-cve-dictionary fetch --dbtype redis --dbpath "redis://127.0.0.1:6379/0" mitre | |