44 # Run when pushing to stable branches
55 push :
66 branches :
7- - ' master'
8- - ' release-*'
7+ - " master"
8+ - " release-*"
99 # Run on branch/tag creation
1010 create :
1111 # Run on pull requests
@@ -24,36 +24,36 @@ jobs:
2424 env :
2525 MIX_ENV : ci
2626 steps :
27- - uses : actions/checkout@v2
28- - uses : actions/cache@v1
29- with :
30- path : deps
31- key : ${{ runner.os }}-${{ env.elixir_version }}-${{ env.otp_version }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
32- - uses : actions/cache@v1
33- with :
34- path : _build
35- key : ${{ runner.os }}-${{ env.elixir_version }}-${{ env.otp_version }}-_build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}-${{ github.sha }}
36- restore-keys : |
37- ${{ runner.os }}-${{ env.elixir_version }}-${{ env.otp_version }}-_build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
38- - id : plt_cache
39- uses : actions/cache@v1
40- with :
41- path : dialyzer_cache
42- key : ${{ runner.os }}-${{ env.elixir_version }}-${{ env.otp_version }}-dialyzer_cache-${{ github.sha }}
43- restore-keys : |
44- ${{ runner.os }}-${{ env.elixir_version }}-${{ env.otp_version }}-dialyzer_cache-
45- - uses : erlef/setup-beam@v1.15
46- with :
47- otp-version : ${{ env.otp_version }}
48- elixir-version : ${{ env.elixir_version }}
49- - name : Install Dependencies
50- run : mix deps.get
51- - name : Create PLTs dir
52- if : ${{steps.plt_cache.outputs.cache-hit != 'true'}}
53- run : mkdir -p dialyzer_cache && mix dialyzer --plt
54- - name : Run dialyzer
55- # FIXME: This should be set to fail when dialyzer issues are fixed
56- run : mix dialyzer || exit 0
27+ - uses : actions/checkout@v2
28+ - uses : actions/cache@v4
29+ with :
30+ path : deps
31+ key : ${{ runner.os }}-${{ env.elixir_version }}-${{ env.otp_version }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
32+ - uses : actions/cache@v4
33+ with :
34+ path : _build
35+ key : ${{ runner.os }}-${{ env.elixir_version }}-${{ env.otp_version }}-_build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}-${{ github.sha }}
36+ restore-keys : |
37+ ${{ runner.os }}-${{ env.elixir_version }}-${{ env.otp_version }}-_build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
38+ - id : plt_cache
39+ uses : actions/cache@v4
40+ with :
41+ path : dialyzer_cache
42+ key : ${{ runner.os }}-${{ env.elixir_version }}-${{ env.otp_version }}-dialyzer_cache-${{ github.sha }}
43+ restore-keys : |
44+ ${{ runner.os }}-${{ env.elixir_version }}-${{ env.otp_version }}-dialyzer_cache-
45+ - uses : erlef/setup-beam@v1.15
46+ with :
47+ otp-version : ${{ env.otp_version }}
48+ elixir-version : ${{ env.elixir_version }}
49+ - name : Install Dependencies
50+ run : mix deps.get
51+ - name : Create PLTs dir
52+ if : ${{steps.plt_cache.outputs.cache-hit != 'true'}}
53+ run : mkdir -p dialyzer_cache && mix dialyzer --plt
54+ - name : Run dialyzer
55+ # FIXME: This should be set to fail when dialyzer issues are fixed
56+ run : mix dialyzer || exit 0
5757
5858 test-coverage :
5959 name : Build and Test
@@ -65,56 +65,56 @@ jobs:
6565 fail-fast : false
6666 matrix :
6767 rabbitmq :
68- - " rabbitmq:3.12.0-management"
68+ - " rabbitmq:3.12.0-management"
6969 database :
70- - " cassandra:3.11.15"
71- - " scylladb/scylla:5.2.2"
70+ - " cassandra:3.11.15"
71+ - " scylladb/scylla:5.2.2"
7272 services :
7373 rabbitmq :
7474 image : ${{ matrix.rabbitmq }}
7575 ports :
76- - 5672:5672
77- - 15672:15672
76+ - 5672:5672
77+ - 15672:15672
7878 database :
7979 image : ${{ matrix.database }}
8080 ports :
81- - 9042:9042
81+ - 9042:9042
8282 env :
8383 MIX_ENV : test
8484 RABBITMQ_HOST : localhost
8585 CASSANDRA_NODES : localhost
8686 steps :
87- - uses : actions/checkout@v2
88- - uses : actions/cache@v1
89- with :
90- path : deps
91- key : ${{ runner.os }}-${{ env.elixir_version }}-${{ env.otp_version }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
92- restore-keys : |
93- ${{ runner.os }}-${{ env.elixir_version }}-${{ env.otp_version }}-mix-
94- - uses : actions/cache@v1
95- with :
96- path : _build
97- key : ${{ runner.os }}-${{ env.elixir_version }}-${{ env.otp_version }}-_build-${{ github.sha }}
98- restore-keys : |
99- ${{ runner.os }}-${{ env.elixir_version }}-${{ env.otp_version }}-_build-
100- - uses : erlef/setup-beam@v1.15
101- with :
102- otp-version : ${{ env.otp_version }}
103- elixir-version : ${{ env.elixir_version }}
104- - name : Install Dependencies
105- run : mix deps.get
106- - name : Check formatting
107- run : mix format --check-formatted
108- - name : Compile
109- run : mix do compile
110- - name : Wait for Cassandra
111- run : |
112- npm install -g wait-for-cassandra
113- wait-for-cassandra -T 120000 -h $CASSANDRA_NODES
114- - name : Test and Coverage
115- run : mix coveralls.json --exclude wip -o coverage_results
116- - name : Upload Coverage Results to CodeCov
117- env :
118- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
119- run : |
120- bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN
87+ - uses : actions/checkout@v2
88+ - uses : actions/cache@v4
89+ with :
90+ path : deps
91+ key : ${{ runner.os }}-${{ env.elixir_version }}-${{ env.otp_version }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
92+ restore-keys : |
93+ ${{ runner.os }}-${{ env.elixir_version }}-${{ env.otp_version }}-mix-
94+ - uses : actions/cache@v4
95+ with :
96+ path : _build
97+ key : ${{ runner.os }}-${{ env.elixir_version }}-${{ env.otp_version }}-_build-${{ github.sha }}
98+ restore-keys : |
99+ ${{ runner.os }}-${{ env.elixir_version }}-${{ env.otp_version }}-_build-
100+ - uses : erlef/setup-beam@v1.15
101+ with :
102+ otp-version : ${{ env.otp_version }}
103+ elixir-version : ${{ env.elixir_version }}
104+ - name : Install Dependencies
105+ run : mix deps.get
106+ - name : Check formatting
107+ run : mix format --check-formatted
108+ - name : Compile
109+ run : mix do compile
110+ - name : Wait for Cassandra
111+ run : |
112+ npm install -g wait-for-cassandra
113+ wait-for-cassandra -T 120000 -h $CASSANDRA_NODES
114+ - name : Test and Coverage
115+ run : mix coveralls.json --exclude wip -o coverage_results
116+ - name : Upload Coverage Results to CodeCov
117+ env :
118+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
119+ run : |
120+ bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN
0 commit comments