Skip to content

fix invalid string due to gh-action linter false info #224

fix invalid string due to gh-action linter false info

fix invalid string due to gh-action linter false info #224

Workflow file for this run

name: test
on:
push:
pull_request:
jobs:
skip:
runs-on: ubuntu-latest
steps:
- run: echo "Skip job"
before:
runs-on: ubuntu-latest
if: '! contains(github.event.head_commit.message, "[skip ci]")'

Check failure on line 15 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / test

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 15, Col: 9): Unexpected symbol: '"'. Located at position 46 within expression: ! contains(github.event.head_commit.message, "[skip ci]")
steps:
- run: echo "not contains '[skip ci]'"
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
#- windows-latest
#- macOS-latest
nim-version:
- '1.4.0'
- '1.6.14' # stable is already v2 but this hasn't supported that yet
# - 'stable'
needs: before
steps:
- uses: actions/checkout@v1
- name: Cache nimble
id: cache-nimble
uses: actions/cache@v1
with:
path: ~/.nimble
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }}
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: ${{ matrix.nim-version }}
# see. https://github.com/actions/virtual-environments/issues/675
- name: Fix apt packages
run: |
sudo sed -i 's/azure\.//' /etc/apt/sources.list
sudo apt update -yqq
# https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
- name: Install mongodb
run: |
sudo apt-get install gnupg
curl -fsSL https://pgp.mongodb.com/server-6.0.asc | \
sudo gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg \
--dearmor
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
sudo apt-get update -yqq
sudo apt-get install -y mongodb-org
# - name: Start mongodb
# run: |
# sudo systemctl start mongod
# sleep 10
- run: nimble install -Y
# Disabling running mongod since mongod is already running with systemctl
# Disabling test gridfs because no big file available, by setting filename and saveas to blank
# Disabling authenticating since the installed mongo is pristine without setting up the user and password
- name: Nimble test setup and run
run: |
# echo 'switch("define", "nomongod")' > config.nims
mkdir /tmp/mongodbpath
echo 'switch("define", "filename=")' > config.nims
echo 'switch("define", "filename=")' >> config.nims
echo 'switch("define", "saveas=")' >> config.nims
echo 'switch("define", "user=")' >> config.nims
echo 'switch("define", "testReplication=yes")' >> config.nims
echo 'switch("define", "testChangeStreams=yes")' >> config.nims
echo 'hint("ConvFromXToItSelfNotNeeded", off)' >> config.nims
echo 'switch("define", "dbpath=/tmp/mongodbpath")' >> config.nims
echo 'switch("define", "uri")' >> config.nims
nimble test -Y
- uses: actions/checkout@v2.3.1
- run: nim doc --project --index:on --git.url:https://github.com/mashingan/anonimongo --outdir:src/htmldocs src/anonimongo.nim
- name: Deploy docs
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
branch: gh-pages
folder: .