Skip to content

Bump versions in github actions #122

Bump versions in github actions

Bump versions in github actions #122

Workflow file for this run

name: lint-test-stage
on:
push:
branches:
- main
pull_request:
# Only run on PRs against main
branches:
- main
jobs:
# Run linter and tests against JS, TS, and YAML files
linttest:
runs-on: ubuntu-latest
permissions:
checks: write # Needed for GHA to write the checks for the job
contents: read
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: denoland/setup-deno@0df5d9c641efdff149993c321fc27c11c5df8623 # v1.1.3
with:
deno-version: v1.38.0
- name: Cache Deno dependencies
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
key: denoDeps-${{ hashFiles('deno.lock') }}
path: ~/.cache/deno
- name: fmt
run: deno fmt --check
- name: lint
run: deno lint
- name: test
run: |
deno test \
--parallel --unstable --allow-net --allow-env --allow-read \
--ignore=deployments/release \
--junit-path=./report.xml
env:
FENSAK_GITHUB_WEBHOOK_SECRET: ${{ secrets.FENSAK_GITHUB_WEBHOOK_SECRET }}
FENSAK_GITHUB_APP_ID: ${{ secrets.FENSAK_GITHUB_APP_ID }}
FENSAK_GITHUB_APP_PRIVATE_KEY: ${{ secrets.FENSAK_GITHUB_APP_PRIVATE_KEY }}
TEST_FENSAK_GITHUB_INSTALLATION_ID: ${{ secrets.TEST_FENSAK_GITHUB_INSTALLATION_ID }}
FENSAK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: report
uses: mikepenz/action-junit-report@0831a82caad2465c31c6dd929978f640cb42556c # v4.0.3
if: always()
with:
report_paths: "report.xml"
check_name: "deno test report"
# Deploy to staging environment on merges to main.
deploystage:
runs-on: ubuntu-latest
needs: linttest
if: github.ref == 'refs/heads/main'
permissions:
id-token: write # Needed to auth to Deno Deploy
checks: write # Needed for GHA to write the checks for the job
contents: read
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- uses: denoland/deployctl@b841621a76eae438b09e1bce5e74549678c24e7f # v1.8.2
with:
project: fensak-stage
entrypoint: main.ts