Skip to content

Commit b833b77

Browse files
authored
Merge pull request #32 from biigle/patch-1
Fix and improve actions
2 parents b8d7ede + 3965996 commit b833b77

3 files changed

Lines changed: 84 additions & 0 deletions

File tree

.github/workflows/check.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Check
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- '.github/workflows/check.yml'
9+
- 'src/resources/assets/**'
10+
- 'src/public/**'
11+
- 'package.json'
12+
- 'package-lock.json'
13+
pull_request:
14+
paths:
15+
- '.github/workflows/check.yml'
16+
- 'src/resources/assets/**'
17+
- 'src/public/**'
18+
- 'package.json'
19+
- 'package-lock.json'
20+
21+
jobs:
22+
check-js:
23+
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- uses: actions/checkout@v1
28+
with:
29+
fetch-depth: 1
30+
31+
- name: Set registry authentication token
32+
run: echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> .npmrc
33+
env:
34+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
35+
36+
- name: Install dependencies
37+
run: npm install
38+
39+
# Clone core to get access to the variabley stylesheet
40+
- uses: actions/checkout@v1
41+
with:
42+
repository: biigle/core
43+
ref: master
44+
fetch-depth: 1
45+
path: core
46+
47+
- name: Update variables stylesheet link
48+
run: ln -sf ../../../../../core/resources/assets/sass/bootstrap/_variables.scss src/resources/assets/sass/_variables.scss
49+
50+
# Don't use "npm run build" because it also runs the artisan command
51+
- name: Run Vite
52+
run: npx vite build
53+
54+
- name: Check for uncommitted changes
55+
run: '[ -z "$(git status -s --porcelain | grep public)" ]'

.github/workflows/lint.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,18 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- '.github/workflows/lint.yml'
9+
- 'src/resources/assets/**'
10+
- 'package.json'
11+
- 'package-lock.json'
712
pull_request:
13+
paths:
14+
- '.github/workflows/lint.yml'
15+
- 'src/resources/assets/**'
16+
- 'package.json'
17+
- 'package-lock.json'
18+
819

920
jobs:
1021
lint:

.github/workflows/test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,19 @@ on:
44
push:
55
branches:
66
- main
7+
paths-ignore:
8+
- 'src/resources/assets/**'
9+
- 'src/resources/scripts/**'
10+
- 'src/public/**'
11+
- 'package.json'
12+
- 'package-lock.json'
713
pull_request:
14+
paths-ignore:
15+
- 'src/resources/assets/**'
16+
- 'src/resources/scripts/**'
17+
- 'src/public/**'
18+
- 'package.json'
19+
- 'package-lock.json'
820

921
jobs:
1022
test-module:
@@ -34,6 +46,12 @@ jobs:
3446
run: cp .env.example .env
3547
working-directory: ../core
3648

49+
- name: Update .env
50+
run: |
51+
echo USER_ID=$(id -u) >> .env
52+
echo GROUP_ID=$(id -g) >> .env
53+
working-directory: ../core
54+
3755
- name: Set testing key
3856
run: echo "APP_KEY=base64:STZFA4bQKDjE2mlpRPmsJ/okG0eCh4RHd9BghtZeYmQ=" >> .env
3957
working-directory: ../core

0 commit comments

Comments
 (0)