diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e6d4137..e87c036 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -72,6 +72,8 @@ jobs: # a difference. Reverse this using !. run: | ! diff ${{ runner.temp }}/design-system/base.before.css ${{ runner.temp }}/design-system/base.after.css + - name: Reset environment + run: "task reset ${{ env.TASK_OUTPUT }}" - name: Setup tmate session to support debugging if enabled if: runner.debug == '1' uses: mxschmitt/action-tmate@v3 diff --git a/Taskfile.yml b/Taskfile.yml index ae46576..1ce6494 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -10,9 +10,11 @@ tasks: init: summary: Setup this directory for development deps: - - design-system:init - - react:init - - cms:init + - design-system:clone + - react:clone + - cms:clone + cmds: + - task: reset cleanup: cmds: @@ -26,14 +28,16 @@ tasks: - task: cleanup - task: init - design-system:init: - sources: - - design-system/yarn.lock - generates: - - design-system/node_modules/* + reset: + summary: Reset environment. This is useful when switching between tasks, branches etc. + deps: + - design-system:reset + - react:reset + - cms:reset + + design-system:clone: cmds: - git clone https://github.com/danskernesdigitalebibliotek/dpl-design-system design-system - - (cd design-system && yarn install) design-system:link: deps: @@ -65,14 +69,14 @@ tasks: cmds: - yarn dev - react:init: - sources: - - react/yarn.lock - generates: - - react/node_modules/* + design-system:reset: + dir: design-system + cmds: + - yarn install + + react:clone: cmds: - git clone https://github.com/danskernesdigitalebibliotek/dpl-react react - - (cd react && yarn install) react:link: dir: react @@ -103,14 +107,14 @@ tasks: cmds: - yarn dev - cms:init: - sources: - - cms/composer.lock - generates: - - cms/vendor/* + react:reset: + dir: react + cmds: + - yarn install + + cms:clone: cmds: - git clone https://github.com/danskernesdigitalebibliotek/dpl-cms cms - - (cd cms && task dev:reset) cms:link: dir: cms @@ -130,6 +134,11 @@ tasks: cmds: - task dev:start + cms:reset: + dir: cms + cmds: + - task dev:reset + dev:react: deps: - design-system:build