Skip to content

Commit 771fb3c

Browse files
committed
feat: add github actions/templates
1 parent 04defb9 commit 771fb3c

File tree

11 files changed

+209
-7
lines changed

11 files changed

+209
-7
lines changed

.changeset/config.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
"access": "public",
77
"baseBranch": "main",
88
"updateInternalDependencies": "patch",
9-
"ignore": [
10-
"root",
11-
"graphql-example"
12-
],
9+
"ignore": [],
1310
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
1411
"onlyUpdatePeerDependentsWhenOutOfRange": true
1512
},
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: 🐛 Bug report
3+
about: Create a bug report for the mikro-orm-dataloaders find / examples
4+
labels: 'bug'
5+
---
6+
7+
# Bug report
8+
9+
## Describe the bug
10+
11+
A clear and concise description of what the bug is.
12+
13+
## To Reproduce
14+
15+
Steps to reproduce the behavior, please provide code snippets or a repository.
16+
17+
## Expected behavior
18+
19+
A clear and concise description of what you expected to happen.
20+
21+
## Screenshots
22+
23+
If applicable, add screenshots to help explain your problem.
24+
25+
## System information
26+
27+
- Version of mikro-orm-dataloaders: [e.g. 1.0.0]
28+
29+
## Additional context
30+
31+
Add any other context about the problem here.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: ⚡ Feature request
3+
about: Create a feature request for mikro-orm-dataloaders
4+
labels: 'enhancement'
5+
---
6+
7+
# Feature request
8+
9+
## Is your feature request related to a problem? Please describe.
10+
11+
A clear and concise description of what you want and what your use case is.
12+
13+
## Describe the solution you'd like
14+
15+
A clear and concise description of what you want to happen.
16+
17+
## Additional context
18+
19+
Add any other context or screenshots about the feature request here.

.github/ISSUE_TEMPLATE/config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: 🙋 Ask a question
4+
url: https://github.com/darkbasic/mikro-orm-dataloaders/discussions
5+
about: Ask questions and discuss with other community members

.github/semantic.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
titleOnly: true

.github/workflows/codeql.yml

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ "main" ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ "main" ]
20+
schedule:
21+
- cron: '33 16 * * 2'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
# Runner size impacts CodeQL analysis time. To learn more, please see:
27+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
28+
# - https://gh.io/supported-runners-and-hardware-resources
29+
# - https://gh.io/using-larger-runners
30+
# Consider using larger runners for possible analysis time improvements.
31+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
32+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
33+
permissions:
34+
actions: read
35+
contents: read
36+
security-events: write
37+
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
language: [ 'javascript-typescript' ]
42+
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
43+
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
44+
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
45+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
46+
47+
steps:
48+
- name: Checkout repository
49+
uses: actions/checkout@v3
50+
51+
# Initializes the CodeQL tools for scanning.
52+
- name: Initialize CodeQL
53+
uses: github/codeql-action/init@v2
54+
with:
55+
languages: ${{ matrix.language }}
56+
# If you wish to specify custom queries, you can do so here or in a config file.
57+
# By default, queries listed here will override any specified in a config file.
58+
# Prefix the list here with "+" to use these queries and those in the config file.
59+
60+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
61+
# queries: security-extended,security-and-quality
62+
63+
64+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
65+
# If this step fails, then you should remove it and run the build manually (see below)
66+
- name: Autobuild
67+
uses: github/codeql-action/autobuild@v2
68+
69+
# ℹ️ Command-line programs to run using the OS shell.
70+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
71+
72+
# If the Autobuild fails above, remove it and uncomment the following three lines.
73+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
74+
75+
# - run: |
76+
# echo "Run, Build Application using script"
77+
# ./location_of_script_within_repo/buildscript.sh
78+
79+
- name: Perform CodeQL Analysis
80+
uses: github/codeql-action/analyze@v2
81+
with:
82+
category: "/language:${{matrix.language}}"

.github/workflows/pr.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: pr
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
7+
jobs:
8+
release:
9+
uses: darkbasic/shared-config/.github/workflows/release-snapshot.yml@main
10+
with:
11+
npmTag: alpha
12+
buildScript: compile
13+
nodeVersion: 18
14+
secrets:
15+
githubToken: ${{ secrets.GITHUB_TOKEN }}
16+
npmToken: ${{ secrets.NPM_TOKEN }}
17+
18+
dependencies:
19+
uses: darkbasic/shared-config/.github/workflows/changesets-dependencies.yaml@main
20+
secrets:
21+
githubToken: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-stable.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
stable:
9+
uses: darkbasic/shared-config/.github/workflows/release-stable.yml@main
10+
with:
11+
releaseScript: release
12+
nodeVersion: 18
13+
secrets:
14+
githubToken: ${{ secrets.GITHUB_TOKEN }}
15+
npmToken: ${{ secrets.NPM_TOKEN }}

.github/workflows/tests.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Node CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
name: Test packages
12+
runs-on: ubuntu-22.04
13+
14+
steps:
15+
- name: Checkout main
16+
uses: actions/checkout@v4
17+
18+
- name: Setup env
19+
uses: darkbasic/shared-config/setup@main
20+
with:
21+
nodeVersion: 18
22+
23+
- name: Compile packages
24+
run: yarn run compile
25+
26+
- name: Run tests
27+
run: yarn run test
28+
29+
- name: Upload coverage
30+
uses: codecov/codecov-action@v3

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"examples/*"
77
],
88
"scripts": {
9-
"build": "yarn workspace mikro-orm-find-dataloader run build",
9+
"build": "yarn run compile",
10+
"compile": "yarn workspace mikro-orm-find-dataloader run build",
1011
"test": "yarn workspace mikro-orm-find-dataloader run test",
1112
"version": "yarn changeset version && yarn install --immutable",
1213
"release": "yarn run compile && yarn changeset publish"

packages/find/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
"node": ">= 18.12.0"
3131
},
3232
"scripts": {
33-
"build": "yarn clean && yarn compile",
33+
"build": "yarn run compile",
3434
"clean": "yarn run -T rimraf ./dist",
35-
"compile": "yarn run -T tsc",
35+
"compile": "yarn run clean && yarn run -T tsc",
3636
"test": "yarn run -T jest"
3737
},
3838
"jest": {

0 commit comments

Comments
 (0)