File size: 2,010 Bytes
ee18265
 
 
 
 
 
 
 
82cacde
 
 
ee18265
 
 
 
 
 
 
d61a10c
82cacde
 
 
ee18265
 
 
 
 
82cacde
 
ee18265
 
 
 
 
4687df9
 
 
38f177d
 
 
 
 
ee18265
 
 
 
 
 
 
9df0e7d
ee18265
 
 
 
 
 
 
 
38f177d
 
 
 
9df0e7d
38f177d
 
 
 
 
ee18265
82cacde
 
ee18265
38f177d
 
 
 
 
 
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
# Create initial workflow based on GitHub's suggestion for Elixir.

on:
  push:
    branches: ["main"]
  pull_request:
    branches: ["main"]

env:
  MIX_ENV: test

jobs:
  test:
    name: Test codebase
    runs-on: ubuntu-latest

    services:
      postgres:
        image: pgvector/pgvector:pg16
        env:
          POSTGRES_USERNAME: postgres
          POSTGRES_PASSWORD: postgres
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
        ports:
          - 5432:5432

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Install ffmpeg
        run: sudo apt-get install ffmpeg

      # - name: Download Bumblebee model artifacts
      #   uses: actions/download-artifacts
      #   with:
      #     name: bumblebee-cache

      - name: Set up Elixir
        uses: erlef/setup-beam@v1
        with:
          elixir-version: '1.16.0'
          otp-version: '26.0'

      - name: Cache dependencies
        uses: actions/cache@v4
        with:
          path: deps
          key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
          restore-keys: ${{ runner.os }}-mix-

      - name: Install dependencies
        run: mix deps.get

      - name: Print out Bumblebee cache directory
        run:  elixir -e 'IO.puts(:filename.basedir(:user_cache, "bumblebee"))'

      - name: Cache Bumblebee model files
        uses: actions/cache@v4
        with:
          path: /home/runner/.cache/bumblebee
          key: ${{ runner.os }}-bumblebee-${{ hashFiles('**/application.ex') }}
          restore-keys: ${{ runner.os }}-bumblebee-

      - name: Run tests
        env:
          DATABASE_URL: postgresql://postgres:postgres@localhost/medical_transcription_test
        run: mix test

      # - name: Upload Bumblebee model artifacts
      #   uses: actions/upload-artifact@v4
      #   with:
      #     name: bumblebee-cache
      #     path: $HOME/.cache/bumblebee