Skip to content

Commit

Permalink
Fix messy consequency of bad branch managment
Browse files Browse the repository at this point in the history
  • Loading branch information
L-e-x-o-n committed Apr 23, 2024
1 parent eb207b0 commit 62b82c5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 97 deletions.
95 changes: 1 addition & 94 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# separate terms of service, privacy policy, and support
# documentation.

<<<<<<< HEAD
name: Build and test

on:
Expand All @@ -19,51 +18,21 @@ env:
MIX_ENV: test
ELIXIR_VER: '1.16.2'
OTP_VER: '25.0.4'
=======
name: Elixir CI

<<<<<<< HEAD
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
>>>>>>> 43dbb503 (Add Github Elixir action)
=======
on: [push]
#push
#branches: [ "master" ]
#pull_request:
#branches: [ "master" ]

# Sets the ENV `MIX_ENV` to `test` for running tests
env:
MIX_ENV: test
>>>>>>> 16559f24 (Update elixir.yml)

permissions:
contents: read

jobs:
<<<<<<< HEAD
build:
<<<<<<< HEAD
runs-on: ubuntu-latest
name: Build and test

=======
test:
>>>>>>> 16559f24 (Update elixir.yml)
# Set up a Postgres DB service. By default, Phoenix applications
# use Postgres. This creates a database for running tests.
# Additional services can be defined here if required.
services:
db:
<<<<<<< HEAD
image: postgres:15
=======
image: postgres:12
>>>>>>> 16559f24 (Update elixir.yml)
ports: ['5432:5432']
env:
POSTGRES_DB: teiserver_test
Expand All @@ -74,7 +43,6 @@ jobs:
--health-interval 10s
--health-timeout 5s
--health-retries 5
<<<<<<< HEAD
steps:
# Step: Setup Elixir + Erlang image as the base.
Expand Down Expand Up @@ -120,66 +88,5 @@ jobs:
run: mix deps.get

# Step: Execute the tests.
=======
=======
>>>>>>> 16559f24 (Update elixir.yml)

runs-on: ubuntu-latest
name: Test on OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
strategy:
# Specify the OTP and Elixir versions to use when building
# and running the workflow steps.
matrix:
otp: ['25.0.4'] # Define the OTP version [required]
elixir: ['1.16.2'] # Define the elixir version [required]
steps:
# Step: Setup Elixir + Erlang image as the base.
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}

# Step: Check out the code.
- name: Checkout code
uses: actions/checkout@v3

# Step: Define how to cache deps. Restores existing cache if present.
- name: Cache deps
id: cache-deps
uses: actions/cache@v3
env:
cache-name: cache-elixir-deps
with:
path: deps
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ env.cache-name }}-
# Step: Define how to cache the `_build` directory. After the first run,
# this speeds up tests runs a lot. This includes not re-compiling our
# project's downloaded deps every run.
- name: Cache compiled build
id: cache-build
uses: actions/cache@v3
env:
cache-name: cache-compiled-build
with:
path: _build
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ env.cache-name }}-
${{ runner.os }}-mix-
# Step: Download project dependencies. If unchanged, uses
# the cached version.
- name: Install dependencies
run: mix deps.get
<<<<<<< HEAD
>>>>>>> 43dbb503 (Add Github Elixir action)
=======

# Step: Execute the tests.
>>>>>>> 16559f24 (Update elixir.yml)
- name: Run tests
run: mix test
run: mix test
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,9 @@ runtime/
/source_deploy.tar.gz
central.tar.gz
/bin
.vscode/launch.json

# I'm storing server output here, don't want to push it to git
example_output
test_auth
lib/teiserver/account/account_import.ex
.vscode/launch.json
priv/static/css/fontawesome3.css
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ ENV LANG=en_US.UTF-8 \
MIX_ENV=$env
WORKDIR /opt/build
ADD ./bin/build ./bin/build
CMD ["./bin/build"]
CMD ["bin/build"]

0 comments on commit 62b82c5

Please sign in to comment.