Skip to content

Commit

Permalink
Combine workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarun-Kumar07 committed Jan 11, 2024
1 parent 24fced1 commit 294902d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 34 deletions.
31 changes: 26 additions & 5 deletions .github/workflows/docker-image.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,34 @@
name: Publish docker image
name: CI

on:
workflow_run:
workflows: ["Run tests"]
types: [completed]
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
run_tests:
name: Run tests
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test with pytest
run: |
pytest
docker:
needs: run_tests
runs-on: ubuntu-latest
steps:
-
Expand All @@ -29,4 +51,3 @@ jobs:
context: .
push: true
tags: ghcr.io/quantum-tic-tac-toe:latest

29 changes: 0 additions & 29 deletions .github/workflows/run-tests.yml

This file was deleted.

0 comments on commit 294902d

Please sign in to comment.