actions: add "build" step, add "prepare-env" action.
This commit is contained in:
parent
36a8ad84fd
commit
96baf1ff40
5 changed files with 51 additions and 39 deletions
21
.github/actions/prepare-env/action.yml
vendored
Normal file
21
.github/actions/prepare-env/action.yml
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
name: Prepare environment
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 3.1
|
||||
bundler-cache: true
|
||||
- name: Setup NodeJS
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16
|
||||
cache: npm
|
||||
- name: Setup packages
|
||||
shell: bash
|
||||
run: |
|
||||
ruby -S bundle install
|
||||
npm install
|
||||
|
29
.github/workflows/al-quran.yml
vendored
Normal file
29
.github/workflows/al-quran.yml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
name: Al-Quran
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
linter:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v2
|
||||
- name: Prepare environment
|
||||
uses: './.github/actions/prepare-env'
|
||||
- name: eslint
|
||||
run: ruby -S rake linter:typescript
|
||||
- name: rubocop
|
||||
run: ruby -S rake linter:ruby
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v2
|
||||
- name: Prepare environment
|
||||
uses: './.github/actions/prepare-env'
|
||||
- name: nanoc
|
||||
run: ruby -S rake build
|
23
.github/workflows/ruby-linter.yml
vendored
23
.github/workflows/ruby-linter.yml
vendored
|
@ -1,23 +0,0 @@
|
|||
name: Ruby
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
linter:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
ruby: [3.1]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
- run: bundle install
|
||||
- run: ruby -S rake linter:ruby
|
16
.github/workflows/typescript-linter.yml
vendored
16
.github/workflows/typescript-linter.yml
vendored
|
@ -1,16 +0,0 @@
|
|||
name: TypeScript
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
linter:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v3
|
||||
- run: npm i
|
||||
- run: npm run eslint
|
|
@ -141,6 +141,7 @@ GEM
|
|||
PLATFORMS
|
||||
arm64-darwin-22
|
||||
x86_64-freebsd-13
|
||||
x86_64-linux
|
||||
|
||||
DEPENDENCIES
|
||||
adsf
|
||||
|
|
Loading…
Reference in a new issue