github.com/ydb-platform/ydb-go-sdk/v3@v3.57.0/.github/workflows/examples.yml (about) 1 name: examples 2 on: 3 push: 4 branches: 5 - master 6 - release-* 7 pull_request: 8 workflow_dispatch: 9 jobs: 10 basic-ydb: 11 concurrency: 12 group: basic-ydb-${{ github.ref }}-${{ matrix.ydb-version }}-${{ matrix.application }} 13 cancel-in-progress: true 14 runs-on: ubuntu-latest 15 strategy: 16 fail-fast: false 17 matrix: 18 ydb-version: [ 23.3, 24.1 ] 19 application: [ native/table, native/query, database_sql, gorm, xorm ] 20 services: 21 ydb: 22 image: ydbplatform/local-ydb:${{ matrix.ydb-version }} 23 ports: 24 - 2135:2135 25 - 2136:2136 26 - 8765:8765 27 volumes: 28 - /tmp/ydb_certs:/ydb_certs 29 env: 30 YDB_LOCAL_SURVIVE_RESTART: true 31 YDB_USE_IN_MEMORY_PDISKS: true 32 YDB_TABLE_ENABLE_PREPARED_DDL: true 33 options: '-h localhost' 34 env: 35 OS: ubuntu-latest 36 YDB_CONNECTION_STRING: grpc://localhost:2136/local 37 YDB_ANONYMOUS_CREDENTIALS: 1 38 YDB_VERSION: ${{ matrix.ydb-version }} 39 steps: 40 - name: Checkout code 41 uses: actions/checkout@v3 42 - name: Install Go 43 uses: actions/setup-go@v3 44 with: 45 cache: true 46 - name: Run basic example ${{ matrix.application }} 47 working-directory: ./examples/basic/${{ matrix.application }} 48 run: go run . 49 basic-postgres: 50 concurrency: 51 group: basic-postgres-${{ matrix.application }}-${{ github.ref }} 52 cancel-in-progress: true 53 runs-on: ubuntu-latest 54 strategy: 55 fail-fast: false 56 matrix: 57 application: [ gorm, xorm ] 58 services: 59 postgres: 60 image: postgres 61 env: 62 POSTGRES_PASSWORD: postgres 63 POSTGRES_DB: basic 64 options: >- 65 --health-cmd pg_isready 66 --health-interval 5s 67 --health-timeout 5s 68 --health-retries 5 69 ports: 70 - 5432:5432 71 env: 72 OS: ubuntu-latest 73 GO: 1.21.x 74 POSTGRES_CONNECTION_STRING: postgres://postgres:postgres@localhost:5432/basic?sslmode=disable 75 steps: 76 - name: Checkout code 77 uses: actions/checkout@v3 78 - name: Install Go 79 uses: actions/setup-go@v3 80 with: 81 cache: true 82 - name: Run basic example ${{ matrix.application }} with postgres 83 working-directory: ./examples/basic/${{ matrix.application }} 84 run: go run . 85 basic-sqlite: 86 concurrency: 87 group: basic-sqlite-${{ matrix.application }}-${{ github.ref }} 88 cancel-in-progress: true 89 runs-on: ubuntu-latest 90 strategy: 91 fail-fast: false 92 matrix: 93 application: [ gorm, xorm ] 94 env: 95 OS: ubuntu-latest 96 GO: 1.21.x 97 SQLITE_CONNECTION_STRING: ${{ matrix.application }}.db 98 steps: 99 - name: Checkout code 100 uses: actions/checkout@v3 101 - name: Install Go 102 uses: actions/setup-go@v3 103 with: 104 cache: true 105 - name: Run basic example ${{ matrix.application }} with sqlite 106 working-directory: ./examples/basic/${{ matrix.application }} 107 run: go run .