feat: CircleCI -> GH Actions #3
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: Compile and check | |
on: push | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
# checks: | |
# name: Code checks | |
# uses: coingaming/.github/.github/workflows/code-checks.yml@main | |
# secrets: inherit | |
# with: | |
# mix-env: dev | |
# cache_paths: "test/protobuf_test_app/lib/generated" | |
# elixir-version: "1.17.2" | |
# otp-version: "27.0" | |
# | |
build_test: | |
name: Build for tests | |
uses: coingaming/.github/.github/workflows/build.yml@main | |
secrets: inherit | |
with: | |
mix-env: test | |
cache_paths: "elixir/test/proto" | |
elixir-version: "1.17.2" | |
otp-version: "27.0" | |
elixir-code-path: "elixir" | |
# | |
# dialyzer: | |
# name: Dialyzer | |
# needs: build_test | |
# uses: coingaming/.github/.github/workflows/dialyzer.yml@main | |
# secrets: inherit | |
# with: | |
# mix-env: test | |
# cache_paths: "test/protobuf_test_app/lib/generated" | |
# elixir-version: "1.17.2" | |
# otp-version: "27.0" | |
# | |
# tests: | |
# name: Tests | |
# needs: build_test | |
# runs-on: ubuntu-20.04 | |
# | |
# services: | |
# postgres: | |
# image: postgres:11-alpine | |
# env: | |
# POSTGRES_PASSWORD: postgres | |
# # Set health checks to wait until postgres has started | |
# options: >- | |
# --health-cmd pg_isready | |
# --health-interval 10s | |
# --health-timeout 5s | |
# --health-retries 5 | |
# ports: | |
# - 5432:5432 | |
# localstack: | |
# image: localstack/localstack | |
# env: | |
# SERVICES: sqs | |
# DEBUG: true | |
# ports: | |
# - 4566:4566 | |
# | |
# strategy: | |
# fail-fast: true | |
# matrix: | |
# #TODO: disabled escda temporary | |
# #algo: [rsa, ecdsa] | |
# algo: [rsa] | |
# | |
# env: | |
# ALGO: ${{ matrix.algo }} | |
# MIX_ENV: test | |
# | |
# steps: | |
# - name: Prepare repo and env | |
# uses: coingaming/.github/actions/prepare@main | |
# with: | |
# mix-env: test | |
# elixir-version: "1.17.2" | |
# otp-version: "27.0" | |
# token: ${{ secrets.GH_TOKEN }} | |
# cache_paths: test/protobuf_test_app/lib/generated | |
# | |
# - name: Start epmd | |
# run: epmd -daemon | |
# | |
# - name: DB setup | |
# run: mix ecto.reset | |
# | |
# - name: Tests | |
# continue-on-error: true | |
# run: mix test | |
# | |
# - name: DB setup | |
# run: mix ecto.reset | |
# | |
# - name: Tests | |
# run: mix test --failed | |
# | |
# build_bench: | |
# name: Build for bench | |
# uses: coingaming/.github/.github/workflows/build.yml@main | |
# secrets: inherit | |
# with: | |
# mix-env: bench | |
# cache_paths: "test/protobuf_test_app/lib/generated" | |
# elixir-version: "1.17.2" | |
# otp-version: "27.0" | |
# | |
# bench: | |
# name: Benchmark | |
# needs: build_bench | |
# runs-on: ubuntu-20.04 | |
# | |
# services: | |
# postgres: | |
# image: postgres:11-alpine | |
# env: | |
# POSTGRES_PASSWORD: postgres | |
# # Set health checks to wait until postgres has started | |
# options: >- | |
# --health-cmd pg_isready | |
# --health-interval 10s | |
# --health-timeout 5s | |
# --health-retries 5 | |
# ports: | |
# - 5432:5432 | |
# localstack: | |
# image: localstack/localstack | |
# env: | |
# SERVICES: sqs | |
# DEBUG: true | |
# ports: | |
# - 4566:4566 | |
# | |
# env: | |
# MIX_ENV: bench | |
# | |
# steps: | |
# - name: Prepare repo and env | |
# uses: coingaming/.github/actions/prepare@v1.1.0 | |
# with: | |
# mix-env: ${{ env.MIX_ENV }} | |
# elixir-version: "1.17.2" | |
# otp-version: "27.0" | |
# token: ${{ secrets.GH_TOKEN }} | |
# cache_paths: test/protobuf_test_app/lib/generated | |
# | |
# - name: DB setup | |
# run: mix ecto.reset | |
# | |
# - name: Benchmarks | |
# run: mix bench | |
# | |
# - name: Profiler | |
# run: mix profile.effect | |
# | |
# | |
# release: | |
# name: Release to HEX with SemanticRelease | |
# needs: [checks, dialyzer, tests, bench] | |
# uses: coingaming/.github/.github/workflows/release-hex.yml@main | |
# secrets: inherit | |
# with: | |
# mix-env: test | |
# cache_paths: "test/protobuf_test_app/lib/generated" | |
# elixir-version: "1.17.2" | |
# otp-version: "27.0" |