clean #6
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
# This workflow will install Deno then run Deno lint and test. | |
# For more information see: https://github.com/denoland/setup-deno | |
name: Run Deno Tests | |
on: | |
push: | |
branches: ["main","test"] | |
pull_request: | |
branches: ["main","test"] | |
permissions: | |
id-token: write # This is required to allow the GitHub Action to authenticate with Deno Deploy. | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
DENO_DIR: deno_dir | |
CHROMIUM_PATH: deno_dir/deno_puppeteer/chromium/ | |
steps: | |
- name: Setup repo | |
uses: actions/checkout@v3 | |
- name: Setup .env secrets file | |
run: echo $ENV_GITHUB_ACTIONS | base64 -d > .env | |
env: | |
ENV_GITHUB_ACTIONS: ${{ secrets.ENV_GITHUB_ACTIONS }} | |
- name: Setup Deno | |
# uses: denoland/setup-deno@v1 | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.35.3 | |
- name: Verify formatting | |
run: deno fmt --check | |
# - name: Run linter | |
# run: deno lint | |
- name: Cache Deno dependencies | |
uses: actions/cache@v3 | |
with: | |
# The Chrome install gets cached in here too... | |
key: denoDeps-${{ hashFiles('deno.lock') }} | |
path: ${{ env.DENO_DIR }} | |
- name: Cache puppeteer | |
uses: actions/cache@v3 | |
with: | |
key: puppeteer_${{ runner.os }}_v16_2_0 | |
path: ${{ env.CHROMIUM_PATH }} | |
- name: Install Chromium for Puppeteer | |
run: PUPPETEER_PRODUCT=chrome deno run -A --unstable https://deno.land/x/[email protected]/install.ts | |
- name: Run tests | |
run: deno test -A | |
- name: Build step | |
run: "deno task build" | |
- name: Upload to Deno Deploy | |
uses: denoland/deployctl@v1 | |
with: | |
project: "videopoker-academy" | |
entrypoint: "./main.ts" | |