forked from FreeTubeApp/FreeTube
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 1.95 KB
/
linter.yml
File metadata and controls
65 lines (55 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# This is a basic workflow to help you get started with Actions
name: Linter
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
pull_request:
branches: [ master, development, '**-RC' ]
permissions: {}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
lint:
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions:
contents: read
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Get yarn cache directory
id: cache_dir
shell: bash
run: |
{
echo 'cache_dir<<EOF'
yarn cache dir
echo EOF
} >> "$GITHUB_OUTPUT"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- name: Use Node.js 24.x
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f #v6.3.0
with:
node-version: 24.x
package-manager-cache: false
# This workflow runs on pull requests which are untrusted
# so we only restore the yarn cache, we don't save it to avoid cache poisoning
- name: Restore yarn cache
id: restore_cache
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 #v5.0.3
with:
key: ${{ format('node-cache-{0}-{1}-yarn-{2}', runner.os, runner.arch, hashFiles('yarn.lock')) }}
path: ${{ steps.cache_dir.outputs.cache_dir }}
- run: yarn run ci
shell: bash
env:
ELECTRON_SKIP_BINARY_DOWNLOAD: '1'
- run: yarn run lint
shell: bash
# let's verify that webpack is able to package the project
- run: yarn run pack
shell: bash
# verify that webpack is able to package the project using the web config
- run: yarn run pack:web
shell: bash