mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
Initial commit
This commit is contained in:
41
.github/scripts/release.sh
vendored
Normal file
41
.github/scripts/release.sh
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
set -xe
|
||||
# This script scp'd to the build host and executed to create a new release.
|
||||
|
||||
orig_dir=`pwd`
|
||||
|
||||
# Some preliminary housekeeping
|
||||
rm -rf /tmp/cloudfire
|
||||
mkdir -p /tmp/cloudfire
|
||||
cd /tmp/cloudfire
|
||||
mv ~/cloudfire_web.tar .
|
||||
tar -xf cloudfire_web.tar
|
||||
|
||||
# Start build
|
||||
echo 'Building release for system:'
|
||||
uname -a
|
||||
|
||||
# Ensure MIX_ENV is prod throughout the build
|
||||
export MIX_ENV=prod
|
||||
|
||||
# Set terminal to UTF-8
|
||||
export LC_CTYPE="en_US.UTF-8"
|
||||
|
||||
# Set required env vars for the app to boot. These will not be used.
|
||||
export DATABASE_URL="ecto://dummy:dummy@dummy/dummy"
|
||||
export SECRET_KEY_BASE="dummy"
|
||||
|
||||
# Fetch dependencies, compile, compile static assets
|
||||
mix local.hex --force
|
||||
mix local.rebar --force
|
||||
mix deps.get --only prod
|
||||
mix compile
|
||||
cd assets
|
||||
npm install
|
||||
cd ..
|
||||
npm run deploy --prefix ./assets
|
||||
mix phx.digest
|
||||
mix release
|
||||
|
||||
# XXX: Append version number to release tarball
|
||||
tar -zcf $HOME/release.tar.gz _build
|
||||
46
.github/workflows/main.yml
vendored
Normal file
46
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
- release
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-18.04
|
||||
env:
|
||||
MIX_ENV: test
|
||||
POSTGRES_HOST: localhost
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:12
|
||||
ports:
|
||||
- 5432:5432
|
||||
env:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Run Static Tests
|
||||
uses: actions/setup-elixir@v1
|
||||
with:
|
||||
elixir-version: 1.10.2
|
||||
otp-version: 22.3.2
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
cd cloudfire_umbrella/
|
||||
mix deps.get --only test
|
||||
- name: Setup Database
|
||||
run: |
|
||||
cd cloudfire_umbrella
|
||||
mix ecto.create
|
||||
mix ecto.migrate
|
||||
- name: Run Tests
|
||||
run: |
|
||||
cd cloudfire_umbrella/
|
||||
mix test
|
||||
Reference in New Issue
Block a user