CI improvements (#4)
* Make deploy dependent on succesful testing * Use cache action v4 * Test on ubuntu 24.04
This commit is contained in:
@@ -3,7 +3,7 @@ on: push
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: erlef/setup-beam@v1
|
- uses: erlef/setup-beam@v1
|
||||||
@@ -12,7 +12,7 @@ jobs:
|
|||||||
version-file: .tool-versions
|
version-file: .tool-versions
|
||||||
- name: Cache deps
|
- name: Cache deps
|
||||||
id: cache-deps
|
id: cache-deps
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
env:
|
env:
|
||||||
cache-name: cache-elixir-deps
|
cache-name: cache-elixir-deps
|
||||||
with:
|
with:
|
||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
# project's downloaded deps every run.
|
# project's downloaded deps every run.
|
||||||
- name: Cache compiled build
|
- name: Cache compiled build
|
||||||
id: cache-build
|
id: cache-build
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
env:
|
env:
|
||||||
cache-name: cache-compiled-build
|
cache-name: cache-compiled-build
|
||||||
with:
|
with:
|
||||||
@@ -53,6 +53,7 @@ jobs:
|
|||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
name: Deploy app
|
name: Deploy app
|
||||||
|
needs: test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
concurrency: deploy-group # optional: ensure only one action runs at a time
|
concurrency: deploy-group # optional: ensure only one action runs at a time
|
||||||
|
|||||||
Reference in New Issue
Block a user