summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorBen Busby <contact@benbusby.com>2025-01-21 13:46:29 -0700
committerBen Busby <contact@benbusby.com>2025-01-21 13:46:29 -0700
commitb5bad4defc6c75b9b969658229ce5fd2f3a46107 (patch)
treeacc460a4e15669e71dc61f0df2df5a27c6d2f965 /.github
parente0e395f3c82627190897683a40e4ba28104a03f9 (diff)
downloadfarside-b5bad4defc6c75b9b969658229ce5fd2f3a46107.tar.gz
Rewrite project, add daily update of services list
The project was rewritten from Elixir to Go, primarily because: - I don't write Elixir anymore and don't want to maintain a project in a language I no longer write - I already write Go for other projects, including my day job, so it's a safer bet for a project that I want to maintain long term - Go allows me to build portable executables that will make it easier for others to run farside on their own machines The Go version of Farsside also has a built in task to fetch the latest services{-full}.json file from the repo and ingest it, which makes running a farside server a lot simpler. It also automatically fetches the latest instance state from https://farside.link unless configured as a primary farside node, which will allow others to use farside without increasing traffic to all instances that are queried by farside (just to the farside node itself).
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/elixir.yml38
-rw-r--r--.github/workflows/tests.yml19
2 files changed, 19 insertions, 38 deletions
diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml
deleted file mode 100644
index e42307f..0000000
--- a/.github/workflows/elixir.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-name: Elixir CI
-
-on:
- push:
- branches: [ main ]
- pull_request:
- branches: [ main ]
-
-jobs:
- build:
-
- name: Build and test
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v3
-
- - name: Set up Elixir
- uses: erlef/setup-beam@v1
- with:
- elixir-version: '1.12.3'
- otp-version: '24'
-
- - name: Restore dependencies cache
- uses: actions/cache@v3
- with:
- path: deps
- key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
- restore-keys: ${{ runner.os }}-mix-
-
- - name: Install dependencies
- run: mix deps.get
-
- - name: Initialize services
- run: FARSIDE_TEST=1 FARSIDE_SERVICES_JSON=services-full.json mix run -e Farside.Instances.sync
-
- - name: Run tests
- run: FARSIDE_TEST=1 FARSIDE_SERVICES_JSON=services-full.json mix test --trace
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 0000000..e0bd2fe
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,19 @@
+on: [push, pull_request]
+name: Tests
+jobs:
+ test:
+ strategy:
+ matrix:
+ go-version: [1.21.x, 1.22.x, 1.23.x]
+ os: [ubuntu-latest, macos-latest, windows-latest]
+ runs-on: ${{ matrix.os }}
+ steps:
+ - name: Install Go
+ uses: actions/setup-go@v2
+ with:
+ go-version: ${{ matrix.go-version }}
+ - name: Checkout code
+ uses: actions/checkout@v2
+ - name: Test
+ run: go test -v ./...
+