Skip to content

Commit

Permalink
Updates workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmerfield committed Oct 6, 2023
1 parent 9a53a2b commit 09335c9
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 65 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/proxy-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
# - uses: leafo/gh-actions-luarocks@v4
# with:
# withLuaPath: "/usr/local/openresty/luajit/"
- name: Set up Redis
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: ${{ matrix.redis-version }}

- name: Set up Node
uses: actions/setup-node@v2
Expand Down
130 changes: 65 additions & 65 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Tests

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -18,72 +18,72 @@ jobs:
redis-version: [6.2.6]

environment: Tests

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Pandoc
if: steps.pandoc.outputs.cache-hit != 'true'
run: |
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-linux-amd64.tar.gz -O pandoc.tar.gz
mkdir pandoc
tar xvzf pandoc.tar.gz --strip-components 1 -C pandoc
echo "$(pwd)/pandoc/bin" >> $GITHUB_PATH
- name: Set up Pandoc
if: steps.pandoc.outputs.cache-hit != 'true'
run: |
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-linux-amd64.tar.gz -O pandoc.tar.gz
mkdir pandoc
tar xvzf pandoc.tar.gz --strip-components 1 -C pandoc
echo "$(pwd)/pandoc/bin" >> $GITHUB_PATH
- name: Source pandoc
run: echo "BLOT_PANDOC_PATH=$(which pandoc)" >> $GITHUB_ENV

- name: Source pandoc
run: echo "BLOT_PANDOC_PATH=$(which pandoc)" >> $GITHUB_ENV
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Set up Redis
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: ${{ matrix.redis-version }}

- name: Set up Redis
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: ${{ matrix.redis-version }}
- name: Load dependencies
uses: actions/cache@v2
id: cache-node-dependencies
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}

- name: Load dependencies
uses: actions/cache@v2
id: cache-node-dependencies
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}

- name: Install Dependencies
if: steps.cache-node-dependencies.outputs.cache-hit != 'true'
env:
PUPETEER_PRODUCT: firefox
run: npm ci
- name: Install Dependencies
if: steps.cache-node-dependencies.outputs.cache-hit != 'true'
env:
PUPETEER_PRODUCT: firefox
run: npm ci

- name: Run tests
env:
BLOT_CACHE: false
BLOT_DIRECTORY: /home/runner/work/Blot/Blot
NODE_PATH: /home/runner/work/Blot/Blot/app
BLOT_CACHE_DIRECTORY: /home/runner/work/Blot/Blot/cache
BLOT_DEBUG: false
BLOT_MAINTENANCE: false
BLOT_PRODUCTION: true
BLOT_PROTOCOL: https
BLOT_ENVIRONMENT: production
BLOT_HOST: blot.development
BLOT_ADMIN_EMAIL: ${{ secrets.BLOT_ADMIN_EMAIL }}
BLOT_DROPBOX_APP_SECRET: ${{ secrets.BLOT_DROPBOX_APP_SECRET }}
BLOT_DROPBOX_FULL_SECRET: ${{ secrets.BLOT_DROPBOX_FULL_SECRET }}
BLOT_DROPBOX_TEST_ACCOUNT_APP_TOKEN: ${{ secrets.BLOT_DROPBOX_TEST_ACCOUNT_APP_TOKEN }}
BLOT_DROPBOX_TEST_ACCOUNT_FULL_TOKEN: ${{ secrets.BLOT_DROPBOX_TEST_ACCOUNT_FULL_TOKEN }}
BLOT_DROPBOX_TEST_ACCOUNT_ID: ${{ secrets.BLOT_DROPBOX_TEST_ACCOUNT_ID }}
BLOT_MAILGUN_KEY: ${{ secrets.BLOT_MAILGUN_KEY }}
BLOT_SESSION_SECRET: ${{ secrets.BLOT_SESSION_SECRET }}
BLOT_TWITTER_ACCESS_TOKEN_KEY: ${{ secrets.BLOT_TWITTER_ACCESS_TOKEN_KEY }}
BLOT_TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.BLOT_TWITTER_ACCESS_TOKEN_SECRET }}
BLOT_TWITTER_CONSUMER_KEY: ${{ secrets.BLOT_TWITTER_CONSUMER_KEY }}
BLOT_TWITTER_CONSUMER_SECRET: ${{ secrets.BLOT_TWITTER_CONSUMER_SECRET }}
BLOT_REDIS_HOST: 127.0.0.1
run: |
git config --global user.email "admin@example.com"
git config --global user.name "Admin"
node app/setup
npm test
- name: Run tests
env:
BLOT_CACHE: false
BLOT_DIRECTORY: /home/runner/work/Blot/Blot
NODE_PATH: /home/runner/work/Blot/Blot/app
BLOT_CACHE_DIRECTORY: /home/runner/work/Blot/Blot/cache
BLOT_DEBUG: false
BLOT_MAINTENANCE: false
BLOT_PRODUCTION: true
BLOT_PROTOCOL: https
BLOT_ENVIRONMENT: production
BLOT_HOST: blot.development
BLOT_ADMIN_EMAIL: ${{ secrets.BLOT_ADMIN_EMAIL }}
BLOT_DROPBOX_APP_SECRET: ${{ secrets.BLOT_DROPBOX_APP_SECRET }}
BLOT_DROPBOX_FULL_SECRET: ${{ secrets.BLOT_DROPBOX_FULL_SECRET }}
BLOT_DROPBOX_TEST_ACCOUNT_APP_TOKEN: ${{ secrets.BLOT_DROPBOX_TEST_ACCOUNT_APP_TOKEN }}
BLOT_DROPBOX_TEST_ACCOUNT_FULL_TOKEN: ${{ secrets.BLOT_DROPBOX_TEST_ACCOUNT_FULL_TOKEN }}
BLOT_DROPBOX_TEST_ACCOUNT_ID: ${{ secrets.BLOT_DROPBOX_TEST_ACCOUNT_ID }}
BLOT_MAILGUN_KEY: ${{ secrets.BLOT_MAILGUN_KEY }}
BLOT_SESSION_SECRET: ${{ secrets.BLOT_SESSION_SECRET }}
BLOT_TWITTER_ACCESS_TOKEN_KEY: ${{ secrets.BLOT_TWITTER_ACCESS_TOKEN_KEY }}
BLOT_TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.BLOT_TWITTER_ACCESS_TOKEN_SECRET }}
BLOT_TWITTER_CONSUMER_KEY: ${{ secrets.BLOT_TWITTER_CONSUMER_KEY }}
BLOT_TWITTER_CONSUMER_SECRET: ${{ secrets.BLOT_TWITTER_CONSUMER_SECRET }}
BLOT_REDIS_HOST: 127.0.0.1
run: |
git config --global user.email "admin@example.com"
git config --global user.name "Admin"
node app/setup
npm test

0 comments on commit 09335c9

Please sign in to comment.