-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add basic github workflow #208
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0b23364
add github workflow
achou11 3165590
update npm command
achou11 e5549d3
Update .github/workflows/ci.yml
achou11 4675e08
run formatting and unit test steps instead of types
achou11 c96b816
fix types check command for backend job
achou11 7df6f57
create separate job for shared checks
achou11 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
# By default, a workflow only runs when a pull_request's activity type is | ||
# opened, synchronize, or reopened. Adding ready_for_review here ensures | ||
# that CI runs when a PR is marked as not a draft, since we skip CI when a | ||
# PR is draft | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
|
||
jobs: | ||
all: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
- name: Install deps | ||
run: npm ci | ||
- name: Check formatting | ||
run: npm run lint:prettier | ||
|
||
backend: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
strategy: | ||
fail-fast: false | ||
defaults: | ||
run: | ||
working-directory: './src/backend' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
- name: Install deps | ||
run: | | ||
npm ci --ignore-scripts | ||
npm run postinstall | ||
- name: Check types | ||
run: npm run lint:types | ||
|
||
frontend: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
- name: Install deps | ||
run: npm ci | ||
- name: Build translations | ||
run: npm run build:translations | ||
- name: Build Intl polyfills | ||
run: npm run build:intl-polyfills | ||
- name: Run unit tests | ||
run: npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's probably a way to de-duplicate some of the setup steps that are shared by these jobs but can look into it as a follow-up
note to self: look into composite actions