Skip to content

Commit

Permalink
ci: setup ci workflow for unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
exbotanical committed Oct 20, 2023
1 parent a4ffd48 commit bc7ab1c
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Continuous Integration Workflow

on:
push:
branches:
- master

pull_request:
branches:
- master

jobs:
test_job:
runs-on: ubuntu-latest
name: A job to run the Ys tests
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Test action step
id: test
uses: ./.github/actions/test

- name: Get the output data
run: echo "ls -la results ${{ steps.test.outputs.files }}"
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM ubuntu:20.04

RUN apt-get update && apt-get install -y curl git gcc make

# RUN sh -c "`curl -L https://raw.githubusercontent.com/rylnd/shpec/master/install.sh`"

COPY scripts/entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
12 changes: 12 additions & 0 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh -l

ret="$(make -s unit_test 2>/dev/null)"

echo "$ret"

if [ "$(echo "$ret" | grep 'not ok')" != "" ]; then
exit 1
fi

# make -s integ_test 2>/dev/null
exit $?

0 comments on commit bc7ab1c

Please sign in to comment.