From 02997b2522b9c66072b16f1425c02e81e0085e3c Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Tue, 14 Jul 2020 21:10:56 +0200 Subject: Rename web-server to API This change renames the web-server component to API in order to be more descriptive of its role. The OpenDC API bridges between the frontend on one side and the database and simulator on the other side. --- .github/workflows/api.yml | 34 ++++++++++++++++++++++++++++++++++ .github/workflows/web-server.yml | 34 ---------------------------------- 2 files changed, 34 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/api.yml delete mode 100644 .github/workflows/web-server.yml (limited to '.github') diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml new file mode 100644 index 00000000..7335c737 --- /dev/null +++ b/.github/workflows/api.yml @@ -0,0 +1,34 @@ +name: REST API + +on: + push: + paths: + - 'api/*' + +defaults: + run: + working-directory: api + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + python: [3.8] + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Lint with pylint + run: | + ./check.sh + - name: Test with pytest + run: | + pytest opendc diff --git a/.github/workflows/web-server.yml b/.github/workflows/web-server.yml deleted file mode 100644 index 6f14f97b..00000000 --- a/.github/workflows/web-server.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Web server - -on: - push: - paths: - - 'web-server/*' - -defaults: - run: - working-directory: web-server - -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest] - python: [3.8] - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Lint with pylint - run: | - ./check.sh - - name: Test with pytest - run: | - pytest opendc -- cgit v1.2.3 From 2d625732ed0d74f4291370bddc96df27219b78e6 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Fri, 17 Jul 2020 11:22:44 +0200 Subject: Fix conditional Github Actions trigger This change fixes the conditional Github Actions trigger that we use to only trigger CI invocations for the changed subprojects. Previously, Github Actions was only triggered when a file in the top-level directory of the subproject was changed. --- .github/workflows/api.yml | 54 ++++++++++++++++++------------------- .github/workflows/frontend.yml | 44 +++++++++++++++--------------- .github/workflows/simulator.yml | 60 ++++++++++++++++++++--------------------- 3 files changed, 79 insertions(+), 79 deletions(-) (limited to '.github') diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml index 7335c737..ae67b753 100644 --- a/.github/workflows/api.yml +++ b/.github/workflows/api.yml @@ -1,34 +1,34 @@ name: REST API on: - push: - paths: - - 'api/*' + push: + paths: + - 'api/**' defaults: - run: - working-directory: api + run: + working-directory: api jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest] - python: [3.8] - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Lint with pylint - run: | - ./check.sh - - name: Test with pytest - run: | - pytest opendc + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + python: [3.8] + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Lint with pylint + run: | + ./check.sh + - name: Test with pytest + run: | + pytest opendc diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index ec4a7e71..da6f1031 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -1,29 +1,29 @@ name: Frontend on: - push: - paths: - - 'frontend/*' + push: + paths: + - 'frontend/**' defaults: - run: - working-directory: frontend + run: + working-directory: frontend jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest] - node: [12.x] - steps: - - uses: actions/checkout@v2 - - name: Set up Node.js - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node }} - - run: npm install - - run: npm run build --if-present - - run: npm test - env: - CI: true + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + node: [12.x] + steps: + - uses: actions/checkout@v2 + - name: Set up Node.js + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + - run: npm install + - run: npm run build --if-present + - run: npm test + env: + CI: true diff --git a/.github/workflows/simulator.yml b/.github/workflows/simulator.yml index 887d4af6..8174ae3a 100644 --- a/.github/workflows/simulator.yml +++ b/.github/workflows/simulator.yml @@ -1,37 +1,37 @@ name: Simulator on: - push: - paths: - - 'simulator/*' + push: + paths: + - 'simulator/**' defaults: - run: - working-directory: simulator + run: + working-directory: simulator jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest] - java: [14] - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - name: Set up JDK - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - uses: actions/cache@v1 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} - restore-keys: | - ${{ runner.os }}-gradle- - - name: Build with Gradle - run: ./gradlew assemble - - name: Check with Gradle - run: ./gradlew check --info + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + java: [14] + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - uses: actions/cache@v1 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Build with Gradle + run: ./gradlew assemble + - name: Check with Gradle + run: ./gradlew check --info -- cgit v1.2.3