diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 906b1167..74abbb57 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -102,104 +102,104 @@ jobs: priv/plts - name: Run dialyzer run: mix dialyzer --format github - test: - needs: dependencies - name: Run tests - runs-on: ubuntu-latest - services: - postgres: - image: postgres:14.2 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: epochtalk_server_test - ports: - - 5432:5432 - # Set health checks to wait until postgres has started - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - redis: - ports: - - 6379:6379 - image: redis:7.0.4 - # Set health checks to wait until redis has started - options: >- - --health-cmd "redis-cli ping" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - steps: - - name: Cancel previous runs - uses: styfle/cancel-workflow-action@0.11.0 - with: - access_token: ${{ github.token }} - - name: Checkout - uses: actions/checkout@v3.6.0 - with: - ref: ${{ github.event.client_payload.branch }} - - name: Parse .tool-versions - id: tool-versions - uses: paulo-ferraz-oliveira/parse-tool-versions@v1 - - name: Sets up an Erlang/OTP environment - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - name: Retrieve cached dependencies - uses: actions/cache@v3.3.1 - id: mix-cache - with: - path: | - deps - _build - key: ${{ runner.os }}-${{ steps.tool-versions.outputs.erlang }}-${{ steps.tool-versions.outputs.elixir }}-${{ hashFiles('mix.lock') }} - - name: Run tests - run: mix test - env: - AWS_REGION: ${{ secrets.AWS_REGION }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - release: - needs: [test, static_code_analysis] - name: Release - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3.6.0 - - name: Semantic Release - uses: cycjimmy/semantic-release-action@v4.0.0 - with: - branches: | - [ - 'main', - { - name: 'prerelease', - prerelease: true - }, - ] - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - elixir_docs: - if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/elixir-docs' }} - name: Generate project documentation - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3.6.0 - - name: Sets up an Erlang/OTP environment - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - name: Build docs - uses: lee-dohm/generate-elixir-docs@v1.0.1 - - name: Publish to Pages - uses: peaceiris/actions-gh-pages@v3.9.3 - with: - deploy_key: ${{ secrets.DOCS_DEPLOY_KEY }} - external_repository: epochtalk/server.epochtalk.github.io - publish_dir: ./doc - publish_branch: gh-pages + # test: + # needs: dependencies + # name: Run tests + # runs-on: ubuntu-latest + # services: + # postgres: + # image: postgres:14.2 + # env: + # POSTGRES_USER: postgres + # POSTGRES_PASSWORD: postgres + # POSTGRES_DB: epochtalk_server_test + # ports: + # - 5432:5432 + # # Set health checks to wait until postgres has started + # options: >- + # --health-cmd pg_isready + # --health-interval 10s + # --health-timeout 5s + # --health-retries 5 + # redis: + # ports: + # - 6379:6379 + # image: redis:7.0.4 + # # Set health checks to wait until redis has started + # options: >- + # --health-cmd "redis-cli ping" + # --health-interval 10s + # --health-timeout 5s + # --health-retries 5 + # steps: + # - name: Cancel previous runs + # uses: styfle/cancel-workflow-action@0.11.0 + # with: + # access_token: ${{ github.token }} + # - name: Checkout + # uses: actions/checkout@v3.6.0 + # with: + # ref: ${{ github.event.client_payload.branch }} + # - name: Parse .tool-versions + # id: tool-versions + # uses: paulo-ferraz-oliveira/parse-tool-versions@v1 + # - name: Sets up an Erlang/OTP environment + # uses: erlef/setup-beam@v1 + # with: + # version-file: .tool-versions + # version-type: strict + # - name: Retrieve cached dependencies + # uses: actions/cache@v3.3.1 + # id: mix-cache + # with: + # path: | + # deps + # _build + # key: ${{ runner.os }}-${{ steps.tool-versions.outputs.erlang }}-${{ steps.tool-versions.outputs.elixir }}-${{ hashFiles('mix.lock') }} + # - name: Run tests + # run: mix test + # env: + # AWS_REGION: ${{ secrets.AWS_REGION }} + # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + # release: + # needs: [test, static_code_analysis] + # name: Release + # runs-on: ubuntu-latest + # steps: + # - name: Checkout + # uses: actions/checkout@v3.6.0 + # - name: Semantic Release + # uses: cycjimmy/semantic-release-action@v4.0.0 + # with: + # branches: | + # [ + # 'main', + # { + # name: 'prerelease', + # prerelease: true + # }, + # ] + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # elixir_docs: + # if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/elixir-docs' }} + # name: Generate project documentation + # runs-on: ubuntu-latest + # steps: + # - name: Checkout + # uses: actions/checkout@v3.6.0 + # - name: Sets up an Erlang/OTP environment + # uses: erlef/setup-beam@v1 + # with: + # version-file: .tool-versions + # version-type: strict + # - name: Build docs + # uses: lee-dohm/generate-elixir-docs@v1.0.1 + # - name: Publish to Pages + # uses: peaceiris/actions-gh-pages@v3.9.3 + # with: + # deploy_key: ${{ secrets.DOCS_DEPLOY_KEY }} + # external_repository: epochtalk/server.epochtalk.github.io + # publish_dir: ./doc + # publish_branch: gh-pages