chore: format shell scripts #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test | |
on: [push] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
# Install Node.js | |
- name: Node | Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14.x' | |
# Install Go | |
- name: Go | Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.15 | |
# Build RedisSearch | |
- name: RedisSearch | Checkout RedisSearch | |
uses: actions/checkout@v2 | |
with: | |
repository: RediSearch/RediSearch | |
ref: v2.4.15 | |
path: RediSearch | |
submodules: recursive | |
- name: RedisSearch | Cleans and resets the git repo and its submodules | |
run: | | |
cd RediSearch | |
git clean -xfd | |
git submodule foreach --recursive git clean -xfd | |
git reset --hard | |
git submodule foreach --recursive git reset --hard | |
git submodule update --init --recursive | |
- name: RedisSearch | Setup | |
run: | | |
cd RediSearch | |
make setup | |
- name: RedisSearch | Build | |
run: | | |
cd RediSearch | |
make build | |
- name: RedisSearch | Create redis modules dir | |
run: | | |
sudo mkdir -p /usr/lib/redis/modules/ | |
sudo chown root:root /usr/lib/redis/modules/ | |
- name: RedisSearch | Copy to redis modules dir | |
run: | | |
sudo cp RediSearch/bin/linux-x64-release/search/redisearch.so /usr/lib/redis/modules/redisearch.so | |
sudo chmod 755 /usr/lib/redis/modules/redisearch.so | |
sudo chown root:root /usr/lib/redis/modules/redisearch.so | |
# Build RedisTimeSeries | |
- name: RedisTimeSeries | Checkout RedisTimeSeries | |
uses: actions/checkout@v2 | |
with: | |
repository: RedisTimeSeries/RedisTimeSeries | |
ref: v1.10.0 | |
path: RedisTimeSeries | |
submodules: recursive | |
- name: RedisTimeSeries | Cleans and resets the git repo and its submodules | |
run: | | |
cd RedisTimeSeries | |
git clean -xfd | |
git submodule foreach --recursive git clean -xfd | |
git reset --hard | |
git submodule foreach --recursive git reset --hard | |
git submodule update --init --recursive | |
- name: RedisTimeSeries | Setup | |
run: | | |
cd RedisTimeSeries | |
sbin/setup | |
- name: RedisTimeSeries | Build | |
run: | | |
cd RedisTimeSeries | |
make | |
- name: RedisTimeSeries | Create redis modules dir | |
run: | | |
sudo mkdir -p /usr/lib/redis/modules/ | |
sudo chown root:root /usr/lib/redis/modules/ | |
- name: RedisTimeSeries | Copy to redis modules dir | |
run: | | |
sudo cp RedisTimeSeries/bin/linux-x64-release/redistimeseries.so /usr/lib/redis/modules/redistimeseries.so | |
sudo chmod 755 /usr/lib/redis/modules/redistimeseries.so | |
sudo chown root:root /usr/lib/redis/modules/redistimeseries.so | |
# Redis | |
- name: Redis | setup redis | |
uses: shogo82148/actions-setup-redis@v1 | |
with: | |
redis-version: '6.x' | |
redis-conf: | | |
loadmodule /usr/lib/redis/modules/redisearch.so | |
loadmodule /usr/lib/redis/modules/redistimeseries.so | |
- name: Redis | ping redis | |
run: redis-cli ping | |
# Build Bats | |
- name: Bats | Checkout Bats | |
uses: actions/checkout@v2 | |
with: | |
repository: bats-core/bats-core | |
path: bats-core | |
- name: Bats | Install Bats | |
run: | | |
cd bats-core | |
sudo ./install.sh /usr/local | |
# Build MinIO | |
- name: MinIO | Install MinIO | |
run: | | |
wget https://dl.min.io/server/minio/release/linux-amd64/minio | |
chmod +x minio | |
sudo mv minio /usr/local/bin/ | |
# Build verdaccio and plugins | |
- name: Verdaccio | Checkout repositories | |
uses: actions/checkout@v2 | |
with: | |
repository: favoyang/verdaccio | |
ref: openupm | |
path: verdaccio | |
- name: Verdaccio | Checkout verdaccio-storage-proxy | |
uses: actions/checkout@v2 | |
with: | |
repository: openupm/verdaccio-storage-proxy | |
path: verdaccio-storage-proxy | |
- name: Verdaccio | Checkout verdaccio-redis-storage | |
uses: actions/checkout@v2 | |
with: | |
repository: openupm/verdaccio-redis-storage | |
path: verdaccio-redis-storage | |
- name: Verdaccio | Checkout verdaccio-redis-search-patch | |
uses: actions/checkout@v2 | |
with: | |
repository: openupm/verdaccio-redis-search-patch | |
path: verdaccio-redis-search-patch | |
- name: Verdaccio | Checkout verdaccio-install-counts | |
uses: actions/checkout@v2 | |
with: | |
repository: openupm/verdaccio-install-counts | |
path: verdaccio-install-counts | |
- name: Verdaccio | Install npm libs | |
run: | | |
npm install | |
- name: Verdaccio | Build verdaccio | |
run: ./build-all.sh | |
# Run tests | |
- name: Tests | Run tests | |
run: ./run-tests.sh |