]> git.openstreetmap.org Git - rails.git/blobdiff - .github/workflows/tests.yml
Cancel workflow runs which get superseded automatically
[rails.git] / .github / workflows / tests.yml
index d4a721ff65ff0c523df1b8a59190244ffe0a769d..1c82d20aeef4010e0b556713aa6079485d6e2ea6 100644 (file)
@@ -2,6 +2,9 @@ name: Tests
 on:
   - push
   - pull_request
+concurrency:
+  group: ${{ github.workflow }}-{{ github.head_ref || github.ref }}
+  cancel-in-progress: true
 jobs:
   test:
     name: Ubuntu ${{ matrix.ubuntu }}, Ruby ${{ matrix.ruby }}
@@ -21,14 +24,14 @@ jobs:
       with:
         ruby-version: ${{ matrix.ruby }}
     - name: Cache gems
-      uses: actions/cache@v2.1.7
+      uses: actions/cache@v3
       with:
         path: vendor/bundle
         key: bundle-ubuntu-${{ matrix.ubuntu }}-ruby-${{ matrix.ruby }}-${{ hashFiles('Gemfile.lock') }}
         restore-keys: |
           bundle-ubuntu-${{ matrix.ubuntu }}-ruby-${{ matrix.ruby }}-
     - name: Cache node modules
-      uses: actions/cache@v2.1.7
+      uses: actions/cache@v3
       with:
         path: node_modules
         key: yarn-ubuntu-${{ matrix.ubuntu }}-${{ hashFiles('yarn.lock') }}