-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create workflow to run tests in the cloud
- Loading branch information
1 parent
7e40f8f
commit e296dac
Showing
1 changed file
with
65 additions
and
0 deletions.
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,65 @@ | ||
# Workflow for automated Meticulous tests in Meticulous' cloud. | ||
|
||
name: Tests - react-bmi-calculator (in cloud) | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- releases/* | ||
pull_request: {} | ||
workflow_dispatch: {} | ||
|
||
permissions: | ||
actions: write | ||
contents: read | ||
statuses: write | ||
pull-requests: write | ||
packages: read | ||
|
||
jobs: | ||
test: | ||
name: Report diffs (in cloud) | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js LTS | ||
id: nodejs | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16" | ||
cache: yarn | ||
|
||
- name: Cache node_modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
node_modules | ||
tests/react-bmi-calculator/node_modules | ||
key: node-modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
node-modules-${{ runner.os }} | ||
- name: Install react-bmi-calculator dependencies | ||
working-directory: ./tests/react-bmi-calculator | ||
run: yarn install --frozen-lockfile --non-interactive | ||
|
||
- name: Build react-bmi-calculator | ||
working-directory: ./tests/react-bmi-calculator | ||
run: yarn build | ||
|
||
- name: Serve react-bmi-calculator | ||
working-directory: ./tests/react-bmi-calculator | ||
run: | | ||
yarn serve & | ||
sleep 4 | ||
- name: Run report-diffs-action | ||
id: test | ||
uses: ./in-cloud | ||
with: | ||
api-token: "${{ secrets.METICULOUS_API_TOKEN }}" | ||
app-url: http://localhost:3000 |