Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove external github action to install elixir #38

Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
64b26c6
chore: remove external github action to install elixir
nwittstruck Mar 29, 2024
cbf8f8e
chore: remove external github action to install elixir: rename build …
nwittstruck Mar 29, 2024
3f4fbda
chore: remove external github action to install elixir: include nodej…
nwittstruck Mar 29, 2024
8c80a0e
chore: remove external github action to install elixir: run npm run c…
nwittstruck Mar 29, 2024
95541d3
chore: remove external github action to install elixir: fix caching p…
nwittstruck Mar 29, 2024
cff619c
chore: remove external github action to install elixir: increase vers…
nwittstruck Mar 29, 2024
84442ef
chore: remove external github action to install elixir: separate cach…
nwittstruck Mar 29, 2024
431d8dd
chore: remove external github action to install elixir: test without …
nwittstruck Mar 29, 2024
2461c1f
chore: remove external github action to install elixir: test old version
nwittstruck Mar 29, 2024
eeb6055
chore: remove external github action to install elixir: downgrade pac…
nwittstruck Mar 29, 2024
01a6421
chore: remove external github action to install elixir: remove cache
nwittstruck Mar 29, 2024
467c64d
chore: remove external github action to install elixir: remove cache
nwittstruck Mar 29, 2024
c1fa37d
chore: remove external github action to install elixir: remove cache
nwittstruck Mar 29, 2024
ffc1465
chore: remove external github action to install elixir: remove cache
nwittstruck Mar 29, 2024
c4eea36
chore: remove external github action to install elixir: use nodejs im…
nwittstruck Mar 29, 2024
65313ee
chore: remove external github action to install elixir: update phoeni…
nwittstruck Mar 29, 2024
754f6d8
chore: remove external github action to install elixir: change path f…
nwittstruck Mar 29, 2024
fcb3aa5
chore: remove external github action to install elixir: check if cach…
nwittstruck Mar 29, 2024
272fa14
chore: remove external github action to install elixir: use cache unl…
nwittstruck Mar 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .github/actions/setup-composite-action/action.yml

This file was deleted.

123 changes: 123 additions & 0 deletions .github/workflows/backend_on_push_branch_execute_ci_cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Do not forget to change status badge in ./README.md
name: backend_on_push_branch_execute_ci_cd

on:
push:
branches: [main]
# See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags
pull_request:
# Only branches and tags on the base are evaluated
branches: [main]

jobs:
build_deps:
runs-on: ubuntu-latest
# Currently, this need to be synced manually with the Dockerfile. In the future, the workflow should be changed,
# so that a development container is built from the Dockerfile, pushed, and then re-used in the following steps.
# This would also remove the need to install cmake manually in each step:
container: hexpm/elixir:1.15.7-erlang-26.2.2-debian-bullseye-20240130-slim

steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache
with:
path: deps
key: ${{ runner.os }}-mix-v4-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-v4

- run: mix do local.hex --force, local.rebar --force
- run: mix deps.get
if: steps.cache.outputs.cache-hit != 'true'

backend_check_mix_test:
# Containers must run in Linux based operating systems
runs-on: ubuntu-latest
# Docker Hub image that `container-job` executes in
container: hexpm/elixir:1.15.7-erlang-26.2.2-debian-bullseye-20240130-slim

needs: build_deps

# Service containers to run with `container-job`
services:
# Label used to access the service container
postgres:
image: postgres:latest
env:
# These env variables are required by the postgres service (see above)
POSTGRES_DB: mindwendel_test
POSTGRES_HOST: postgres
POSTGRES_USER: postgres
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

env:
# These env vars are required by our application
# Unfortunately, github workflow does not support yaml anchors ;-(
TEST_DATABASE_HOST: postgres
TEST_DATABASE_NAME: mindwendel_test
TEST_DATABASE_USER: postgres
TEST_DATABASE_USER_PASSWORD: postgres
MIX_ENV: "test"

steps:
# Downloads a copy of the code in your repository before running CI tests
- uses: actions/checkout@v4

- uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-mix-v4-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-v4

- run: mix do local.hex --force, local.rebar --force
- run: mix compile
- run: mix ecto.create
- run: mix ecto.migrate
- run: mix test

backend_check_mix_format:
runs-on: ubuntu-latest
container: hexpm/elixir:1.15.7-erlang-26.2.2-debian-bullseye-20240130-slim

needs: build_deps

steps:
- name: Check out repository code
uses: actions/checkout@v4

- uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-mix-v4-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-v4

- run: mix do local.hex --force, local.rebar --force

- run: mix format --check-formatted

backend_check_mix_gettext_extract_up_to_date:
runs-on: ubuntu-latest
container: hexpm/elixir:1.15.7-erlang-26.2.2-debian-bullseye-20240130-slim

needs: build_deps

steps:
- name: Check out repository code
uses: actions/checkout@v4

- uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-mix-v4-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-v4

- run: mix do local.hex --force, local.rebar --force
- run: mix compile
- run: mix gettext.extract --check-up-to-date
198 changes: 0 additions & 198 deletions .github/workflows/ci.yml

This file was deleted.

Loading
Loading