mirror of
https://github.com/ddworken/hishtory.git
synced 2025-02-02 11:39:24 +01:00
Add a github action test for the docker-compose file
This commit is contained in:
parent
9d26e70f83
commit
fc4ed1db15
32
.github/workflows/docker-compose-test.yml
vendored
Normal file
32
.github/workflows/docker-compose-test.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
name: Tests
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
# - uses: mxschmitt/action-tmate@v3
|
||||
- name: Docker Compose test
|
||||
if: ${{ !startsWith(github.event.head_commit.message, 'Release') }}
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y zsh fish
|
||||
curl -fsSL https://get.docker.com | sudo sh
|
||||
sudo chmod 0755 -R /usr/share/zsh/ || true # Work around a weird bug where zsh on ubuntu actions gives that diretory 0777 which makes zsh refuse to start
|
||||
sudo hostname ghaction-runner-hostname # Set a consistent hostname so we can run tests that depend on it
|
||||
docker compose -f backend/server/docker-compose.yml build
|
||||
docker compose -f backend/server/docker-compose.yml up
|
||||
export HISHTORY_SERVER=http://localhost
|
||||
go build
|
||||
./hishtory install
|
||||
|
Loading…
Reference in New Issue
Block a user