File: test.yml

package info (click to toggle)
emacsql 4.3.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 232 kB
  • sloc: lisp: 1,724; makefile: 89
file content (113 lines) | stat: -rw-r--r-- 3,349 bytes parent folder | download
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Test
permissions: read-all
on: [ push, pull_request ]
env:
  pwd: ${{ github.event.repository.name }}
jobs:
  matrix:
    name: 'Get matrix'
    runs-on: ubuntu-24.04
    outputs:
      matrix: ${{ steps.matrix.outputs.matrix }}
    steps:
      - name: 'Install Emacs'
        uses: purcell/setup-emacs@master
        with:
          version: 30.1
      - name: 'Install scripts'
        uses: actions/checkout@v5
        with:
          repository: emacscollective/workflows
          ref: ${{ inputs.workflow_ref }}
          path: _scripts
          persist-credentials: false
      - name: 'Checkout ${{ github.repository }}'
        uses: actions/checkout@v5
        with:
          path: ${{ env.pwd }}
          persist-credentials: false
      - name: 'Get matrix'
        id: matrix
        working-directory: ${{ env.pwd }}
        run: |
          ../_scripts/bin/get-matrix >> $GITHUB_OUTPUT
          echo "• get-matrix: emacscollective/workflows@${{ inputs.workflow_ref }}"
  main:
    name: 'Test using Emacs ${{ matrix.emacs }}'
    runs-on: ubuntu-24.04
    needs: matrix
    strategy:
      fail-fast: false
      matrix:
        emacs: ${{ fromJson(needs.matrix.outputs.matrix) }}
    services:
      postgres:
        image: postgres:14
        env:
          POSTGRES_PASSWORD: postgres
          POSTGRES_HOST_AUTH_METHOD: trust
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
        ports:
          - 5432:5432
      mysql:
        image: mysql:8.0
        env:
          MYSQL_ROOT_PASSWORD: emacsql
          MYSQL_DATABASE: emacsql
          MYSQL_USER: emacsql
          MYSQL_PASSWORD: emacsql
        ports:
          - 3306:3306
        options: >-
          --health-cmd="mysqladmin ping"
          --health-interval=10s
          --health-timeout=5s
          --health-retries=3
    steps:
      - name: 'Install Emacs'
        uses: purcell/setup-emacs@master
        with:
          version: ${{ matrix.emacs }}
      - name: 'Checkout scripts'
        uses: actions/checkout@v5
        with:
          repository: emacscollective/workflows
          ref: ${{ inputs.workflow_ref }}
          path: _scripts
          persist-credentials: false
      - name: 'Checkout ${{ github.repository }}'
        uses: actions/checkout@v5
        with:
          path: ${{ env.pwd }}
          persist-credentials: false
      - name: 'Install dependencies'
        working-directory: ${{ env.pwd }}
        run: ../_scripts/bin/install-deps
      - name: 'Build Sqlite3'
        working-directory: sqlite3
        run: nix-shell -p sqlite.dev --run "make all"
      - name: 'Build Emacsql'
        run: nix-shell -p sqlite.dev --run "make all"
        working-directory: ${{ env.pwd }}
      - name: 'Test Emacsql'
        run: make test
        working-directory: ${{ env.pwd }}
        env:
          MYSQL_DATABASE: emacsql
          MYSQL_USER: emacsql
          MYSQL_PASSWORD: emacsql
          MYSQL_HOST: 127.0.0.1
          MYSQL_PORT: 3306
          PSQL_DATABASE: postgres
          PSQL_USER: postgres
          PSQL_HOST: 127.0.0.1
          PSQL_PORT: 5432
          PG_DATABASE: postgres
          PG_USER: postgres
          PG_PASSWORD: postgres
          PG_HOST: 127.0.0.1
          PG_PORT: 5432