Skip to content
This repository was archived by the owner on Aug 8, 2024. It is now read-only.

Commit 728d6c1

Browse files
committed
πŸ“¦ switch from travis to github actions
Save the output `app.fba` not that we use it for anything
1 parent 704ac57 commit 728d6c1

File tree

6 files changed

+82
-27
lines changed

6 files changed

+82
-27
lines changed

β€Ž.github/workflows/main.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: main-ci
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
ci:
13+
runs-on: ubuntu-latest
14+
steps:
15+
# checkout v2, with recursive submodule update
16+
- uses: actions/checkout@v2
17+
with:
18+
submodules: recursive
19+
20+
# build the Docker image we use to run the tests
21+
- name: test.sh
22+
run: ./test.sh
23+
24+
# upload-artifact to save the output fba
25+
- uses: actions/upload-artifact@v1
26+
with:
27+
name: FBA output
28+
path: build/app.fba

β€Ž.travis.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

β€ŽDockerfile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
FROM ubuntu:bionic
22

3+
ARG DEBIAN_FRONTEND=noninteractive
4+
35
RUN apt-get update && apt-get install -y \
46
libsecret-1-dev \
57
libssl1.0-dev \
68
node-gyp \
79
nodejs-dev \
8-
npm \
9-
sudo
10+
npm
11+
12+
# get user id from build arg, so we can have read/write access to directories
13+
# mounted inside the container. only the UID is necessary, UNAME just for
14+
# cosmetics
15+
ARG UID=1010
16+
ARG UNAME=builder
17+
18+
RUN useradd --uid $UID --create-home --user-group ${UNAME} && \
19+
echo "${UNAME}:${UNAME}" | chpasswd && adduser ${UNAME} sudo
20+
21+
USER ${UNAME}

β€ŽREADME.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
[![Build Status](https://img.shields.io/travis/com/noahp/fbapp-TimeDateWeather.svg?style=popout-square&logo=travis)](https://travis-ci.com/noahp/fbapp-TimeDateWeather)
1+
[![GitHub Workflow
2+
Status](https://img.shields.io/github/workflow/status/noahp/fbapp-TimeDateWeather/main-ci?style=for-the-badge)](https://github.com/noahp/fbapp-TimeDateWeather/actions)
3+
4+
- [TimeDateWeather](#timedateweather)
5+
- [Attribution](#attribution)
6+
- [Icons](#icons)
7+
- [Weather](#weather)
8+
- [License](#license)
29

310
# TimeDateWeather
11+
412
Super basic date + time + weather (and day's forecast) + steps + hr. No fuss.
513
[Open weather map api](https://openweathermap.org/api).
614

@@ -13,15 +21,19 @@ Today's forecast is in orange- will be either "Rain", "Snow", "Clouds", or
1321
settings and select either "Celsius" or "Fahrenheit", which will force a weather
1422
refresh*
1523

16-
# Attribution
17-
## Icons
24+
## Attribution
25+
26+
### Icons
27+
1828
Icons courtesy of:
1929
<div>Icons made by <a href="https://www.flaticon.com/authors/roundicons" title="Roundicons">Roundicons</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div>
2030
<div>Icons made by <a href="https://www.flaticon.com/authors/google" title="Google">Google</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div>
2131

2232
## Weather
33+
2334
Weather module courtesy of:
2435
https://github.com/gregoiresage/fitbit-weather
2536

2637
# License
38+
2739
No license, do whatever you want!

β€Žtest.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
# Simple test script to run the tests in docker
4+
5+
# Error on any non-zero command, and print the commands as they're run
6+
set -ex
7+
8+
# Make sure we have the docker utility
9+
if ! command -v docker; then
10+
echo "πŸ‹ Please install docker first πŸ‹"
11+
exit 1
12+
fi
13+
14+
# Set the docker image name to default to repo basename
15+
DOCKER_IMAGE_NAME=${DOCKER_IMAGE_NAME:-$(basename -s .git "$(git remote --verbose | awk 'NR==1 { print tolower($2) }')")}
16+
17+
# build the docker image
18+
DOCKER_BUILDKIT=1 docker build -t "$DOCKER_IMAGE_NAME" --build-arg "UID=$(id -u)" -f Dockerfile .
19+
20+
# run the test build
21+
docker run -v"$(pwd):/mnt/workspace" -t "$DOCKER_IMAGE_NAME" bash -c \
22+
"cd /mnt/workspace && \
23+
npm install && \
24+
./node_modules/.bin/npx fitbit-build && \
25+
ls -lh build/app.fba"

β€Žtests.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
Β (0)