Browse Source

Use a service instead of local package.

Mark Story 5 years ago
parent
commit
9ca7ea9ec5
1 changed files with 5 additions and 4 deletions
  1. 5 4
      .github/workflows/ci.yml

+ 5 - 4
.github/workflows/ci.yml

@@ -24,6 +24,10 @@ jobs:
         image: redis
         ports:
           - 6379/tcp
+      memcached:
+        image: memcached
+        ports:
+          - 11211/tcp
 
     steps:
     - name: Setup MySQL 5.7
@@ -70,10 +74,6 @@ jobs:
 
     - name: Install packages
       run: |
-        # memcached installation fails without updating packages.
-        sudo apt update
-        sudo apt install memcached
-
         sudo locale-gen da_DK.UTF-8
         sudo locale-gen de_DE.UTF-8
 
@@ -96,6 +96,7 @@ jobs:
     - name: Run PHPUnit
       env:
         REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
+        MEMCACHED_PORT: ${{ job.services.memcached.ports['11211'] }}
       run: |
         if [[ ${{ matrix.db-type }} == 'sqlite' ]]; then export db_dsn='sqlite:///:memory:'; fi
         if [[ ${{ matrix.db-type }} == 'mysql' && ${{ matrix.php-version }} != '5.6' ]]; then export db_dsn='mysql://root:root@127.0.0.1/cakephp?init[]=SET sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"'; fi