Skip to content

Commit

Permalink
Merge branch 'master' into experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
remyla committed Aug 16, 2024
2 parents bc18991 + bd27426 commit 00244e6
Show file tree
Hide file tree
Showing 5 changed files with 4,652 additions and 1 deletion.
53 changes: 53 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
on: [push]
jobs:
tests:
name: Run Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./server-tests
env:
DEBUG: '*'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- working-directory: ./server-nodejs
run: cp conf_template.json conf.json
- working-directory: ./server-nodejs
run: npm ci
- working-directory: ./server-nodejs
run: npm start & #Would be better to directly run tests with mocha + supertest
#instead of running the server in background
- run: npm ci
- run: npm test

services:
mongo:
image: mvertes/alpine-mongo:latest
ports:
- 27017:27017

push_image:
name: Push Docker image
runs-on: ubuntu-latest
if: github.ref_type == 'tag' ||
contains(fromJSON('["master", "testing", "experimental"]'), github.ref_name)
needs: tests
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- id: meta
uses: docker/metadata-action@v5
with:
images: ${{ github.repository }}

- uses: docker/build-push-action@v5
with:
file: docker/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
on:
release:
types: [published]
jobs:
assets:
name: Push clients as assets
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
VER: ${{ github.event.release.tag_name }}
steps:
- uses: actions/checkout@v4
- run: gh release upload --clobber $VER js/damas.js#damas-$VER.js js/damas-socket.js#damas-socket-$VER.js
cli/damas#damas-$VER.sh py/damas_client.py#damas_$VER.py py/damas_socket.py#damas_socket_$VER.py
Loading

0 comments on commit 00244e6

Please sign in to comment.