Bump actions/upload-artifact from 3 to 4 #272
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '*' | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
test-elixir: | |
runs-on: ubuntu-22.04 | |
name: Test OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} | |
strategy: | |
matrix: | |
otp: [24.x, 25.x] | |
elixir: [1.13.x, 1.14.x, 1.15.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{matrix.otp}} | |
elixir-version: ${{matrix.elixir}} | |
- name: Cache Dependencies | |
uses: actions/[email protected] | |
with: | |
path: | | |
deps | |
_build/dev | |
_build/test | |
key: elixir-cache-${{secrets.CACHE_VERSION}}-${{matrix.elixir}}-otp-${{matrix.otp}}-${{runner.os}}-${{hashFiles('mix.lock')}}-${{github.ref}} | |
restore-keys: | | |
elixir-cache-${{secrets.CACHE_VERSION}}-${{matrix.elixir}}-otp-${{matrix.otp}}-${{runner.os}}-${{hashFiles('mix.lock')}}- | |
elixir-cache-${{secrets.CACHE_VERSION}}-${{matrix.elixir}}-otp-${{matrix.otp}}-${{runner.os}}- | |
- name: Install Dependencies | |
run: mix deps.get | |
- name: Test | |
env: | |
CI: true | |
BINANCE_API_KEY: ./secrets/ci/binance_api_key | |
BINANCE_API_SECRET: ./secrets/ci/binance_api_secret | |
BITMEX_API_KEY: ./secrets/ci/bitmex_api_key | |
BITMEX_API_SECRET: ./secrets/ci/bitmex_api_secret | |
GDAX_API_KEY: ./secrets/ci/gdax_api_key | |
GDAX_API_PASSPHRASE: ./secrets/ci/gdax_api_passphrase | |
GDAX_API_SECRET: ./secrets/ci/gdax_api_secret | |
OKEX_API_KEY: ./secrets/ci/okex_api_key | |
OKEX_API_PASSPHRASE: ./secrets/ci/okex_api_passphrase | |
OKEX_API_SECRET: ./secrets/ci/okex_api_secret | |
DERIBIT_CLIENT_ID: ./secrets/ci/deribit_client_id | |
DERIBIT_CLIENT_SECRET: ./secrets/ci/deribit_client_secret | |
FTX_API_KEY: ./secrets/ci/ftx_api_key | |
FTX_API_SECRET: ./secrets/ci/ftx_api_secret | |
DELTA_EXCHANGE_API_KEY: ./secrets/ci/delta_exchange_api_key | |
DELTA_EXCHANGE_API_SECRET: ./secrets/ci/delta_exchange_api_secret | |
run: | | |
mix tai.gen.migration | |
mix test | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: log artifacts | |
path: | | |
apps/tai/log | |
apps/examples/log | |
- name: Dialyzer | |
run: mix dialyzer | |
dependabot: | |
needs: test-elixir | |
runs-on: ubuntu-latest | |
if: ${{ github.actor == 'dependabot[bot]' }} | |
steps: | |
- name: Dependabot metadata | |
id: metadata | |
uses: dependabot/fetch-metadata@v1 | |
with: | |
github-token: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Auto-merge for Dependabot PRs | |
if: ${{(steps.metadata.outputs.update-type == 'version-update:semver-minor') || (steps.metadata.outputs.update-type == 'version-update:semver-patch')}} | |
run: gh pr merge --auto --merge "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |